Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
b2a8bb3d
Commit
b2a8bb3d
authored
Jan 12, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation for taking env vars from either the environment or the ENV_DIR
parent
60a2598e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
compile
bin/compile
+3
-3
test
bin/test
+11
-0
No files found.
bin/compile
View file @
b2a8bb3d
...
@@ -26,10 +26,10 @@ unset GIT_DIR
...
@@ -26,10 +26,10 @@ unset GIT_DIR
# Provide hook to deal with errors
# Provide hook to deal with errors
trap
build_failed ERR
trap
build_failed ERR
# Load config vars into environment; start with defaults
# Load config vars into environment; set smart defaults
export
NPM_CONFIG_PRODUCTION
=
true
export
NODE_MODULES_CACHE
=
true
export_env_dir
$env_dir
export_env_dir
$env_dir
export
NPM_CONFIG_PRODUCTION
=
${
NPM_CONFIG_PRODUCTION
:-
true
}
export
NODE_MODULES_CACHE
=
${
NODE_MODULES_CACHE
:-
true
}
####### Determine current state
####### Determine current state
...
...
bin/test
View file @
b2a8bb3d
...
@@ -214,6 +214,17 @@ testNoEnvVars() {
...
@@ -214,6 +214,17 @@ testNoEnvVars() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testNonFileEnvVars
()
{
export
NPM_CONFIG_FOO
=
bar
export
NPM_CONFIG_PRODUCTION
=
false
compile
"stable-node"
assertCaptured
"NPM_CONFIG_FOO=bar"
assertCaptured
"NPM_CONFIG_PRODUCTION=false"
assertCapturedSuccess
unset
NPM_CONFIG_FOO
unset
NPM_CONFIG_PRODUCTION
}
testNoDevDependencies
()
{
testNoDevDependencies
()
{
compile
"dev-dependencies"
compile
"dev-dependencies"
assertNotCaptured
"lodash"
assertNotCaptured
"lodash"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment