Commit 25a2e022 authored by Hunter Loftis's avatar Hunter Loftis

rename BUILD_CLEAN to DISABLE_BUILD_CACHE for clarity

parent 173425a3
......@@ -75,13 +75,13 @@ as long as they fall within acceptable semver ranges,
which can lead to outdated modules.
```shell
heroku config:set BUILD_CLEAN=true
heroku config:set DISABLE_BUILD_CACHE=true
git commit -am 'build' --allow-empty
git push heroku master
heroku config:unset BUILD_CLEAN
heroku config:unset DISABLE_BUILD_CACHE
```
Default: `BUILD_CLEAN` defaults to false
Default: `DISABLE_BUILD_CACHE` defaults to false
### Enable or disable devDependencies installation
......
......@@ -33,7 +33,7 @@ trap build_failed ERR
# Load config vars into environment; start with defaults
export NPM_CONFIG_PRODUCTION=true
export BUILD_CLEAN=false
export DISABLE_BUILD_CACHE=false
if [ -d "$env_dir" ]; then
export_env_dir $env_dir
......@@ -81,7 +81,7 @@ info "node_modules cached: $modules_cached"
echo ""
info "NPM_CONFIG_PRODUCTION=$NPM_CONFIG_PRODUCTION"
info "BUILD_CLEAN=$BUILD_CLEAN"
info "DISABLE_BUILD_CACHE=$DISABLE_BUILD_CACHE"
source $bp_dir/bin/warnings.sh
......@@ -145,7 +145,7 @@ elif [ $modules_source == "prebuilt" ]; then
info "Rebuilding any native modules for this architecture"
npm rebuild 2>&1
elif ! $BUILD_CLEAN && ! $cache_busted; then
elif ! $DISABLE_BUILD_CACHE && ! $cache_busted; then
info "Restoring node modules from cache"
cp -r $cache_dir/node/node_modules $build_dir/
info "Pruning unused dependencies"
......
......@@ -178,20 +178,20 @@ testDevDependencies() {
assertCapturedSuccess
}
testBuildClean() {
testDisableCache() {
cache=$(mktmpdir)
env_dir=$(mktmpdir)
compile "build-clean-1" $cache
compile "disable-build-cache-1" $cache
assertCaptured "lodash@1.0.0"
assertCapturedSuccess
compile "build-clean-2" $cache
compile "disable-build-cache-2" $cache
assertCaptured "lodash@1.0.0"
assertCapturedSuccess
echo "true" > $env_dir/BUILD_CLEAN
compile "build-clean-2" $cache $env_dir
echo "true" > $env_dir/DISABLE_BUILD_CACHE
compile "disable-build-cache-2" $cache $env_dir
assertCaptured "lodash@1.3.1"
assertCapturedSuccess
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment