Skip to content
Browse files

Merge pull request #77 from heroku/node-env-production

Set default NODE_ENV to 'production'. Can't sit on the fence forever with this implementation.
  • Loading branch information...
2 parents e7a4fff + ae61974 commit f6062e5c7daa7c8efb86b9659357e23a07b177d7 @zeke zeke committed Dec 20, 2013
Showing with 3 additions and 2 deletions.
  1. +2 −1 bin/compile
  2. +1 −1 bin/test
View
3 bin/compile
@@ -98,7 +98,8 @@ fi
# Update the PATH
status "Building runtime environment"
mkdir -p $build_dir/.profile.d
-echo "export PATH=\"\$HOME/vendor/node/bin:\$HOME/bin:\$HOME/node_modules/.bin:\$PATH\"" > $build_dir/.profile.d/nodejs.sh
+echo "export PATH=\"\$HOME/vendor/node/bin:\$HOME/bin:\$HOME/node_modules/.bin:\$PATH\";\
+export NODE_ENV=${NODE_ENV:-production}" > $build_dir/.profile.d/nodejs.sh
# Post package.json to nomnom service
# Use a subshell so failures won't break the build.
View
2 bin/test
@@ -60,7 +60,7 @@ testUnstableVersion() {
testProfileCreated() {
compile "stable-node"
assertCaptured "Building runtime environment"
- assertFile "export PATH=\"\$HOME/vendor/node/bin:\$HOME/bin:\$HOME/node_modules/.bin:\$PATH\"" ".profile.d/nodejs.sh"
+ assertFile "export PATH=\"\$HOME/vendor/node/bin:\$HOME/bin:\$HOME/node_modules/.bin:\$PATH\";export NODE_ENV=${NODE_ENV:-production}" ".profile.d/nodejs.sh"
assertCapturedSuccess
}

0 comments on commit f6062e5

Please sign in to comment.
Something went wrong with that request. Please try again.