Commit 3717a3e2 authored by Hunter Loftis's avatar Hunter Loftis

add output

parent 72cda87b
...@@ -29,9 +29,6 @@ unset GIT_DIR ...@@ -29,9 +29,6 @@ unset GIT_DIR
mkdir -p $heroku_dir/node mkdir -p $heroku_dir/node
echo "" > $logfile echo "" > $logfile
# Trap errors
trap tail_error_log ERR
# Load config vars into environment; start with defaults # Load config vars into environment; start with defaults
export NPM_CONFIG_PRODUCTION=true export NPM_CONFIG_PRODUCTION=true
export BUILD_CLEAN=false export BUILD_CLEAN=false
...@@ -113,7 +110,7 @@ if [ "$npm_engine" != "" ]; then ...@@ -113,7 +110,7 @@ if [ "$npm_engine" != "" ]; then
npm_engine=$(curl --silent --get --data-urlencode "range=${npm_engine}" https://semver.io/npm/resolve) npm_engine=$(curl --silent --get --data-urlencode "range=${npm_engine}" https://semver.io/npm/resolve)
fi fi
status "Downloading and installing npm $npm_engine (replacing version `npm --version`)..." status "Downloading and installing npm $npm_engine (replacing version `npm --version`)..."
npm install -g npm@$npm_engine >> $logfile 2>&1 npm install -g npm@$npm_engine
fi fi
# Run subsequent commands from the build directory # Run subsequent commands from the build directory
...@@ -142,22 +139,22 @@ if [ "$modules_source" == "" ]; then ...@@ -142,22 +139,22 @@ if [ "$modules_source" == "" ]; then
elif [ $modules_source == "prebuilt" ]; then elif [ $modules_source == "prebuilt" ]; then
status "Rebuilding any native modules for this architecture" status "Rebuilding any native modules for this architecture"
npm rebuild >> $logfile 2>&1 npm rebuild
elif ! $BUILD_CLEAN && ! $cache_busted; then elif ! $BUILD_CLEAN && ! $cache_busted; then
status "Restoring node modules from cache" status "Restoring node modules from cache"
cp -r $cache_dir/node/node_modules $build_dir/ cp -r $cache_dir/node/node_modules $build_dir/
status "Pruning unused dependencies" status "Pruning unused dependencies"
npm prune >> $logfile 2>&1 npm prune
status "Installing any new modules" status "Installing any new modules"
npm install --userconfig $build_dir/.npmrc >> $logfile 2>&1 npm install --userconfig $build_dir/.npmrc
else else
status "Installing node modules" status "Installing node modules"
touch $build_dir/.npmrc touch $build_dir/.npmrc
npm install --userconfig $build_dir/.npmrc >> $logfile 2>&1 npm install --userconfig $build_dir/.npmrc
status "Deduping dependency tree" status "Deduping dependency tree"
npm dedupe >> $logfile 2>&1 npm dedupe
fi fi
####### Create a Procfile if possible ####### Create a Procfile if possible
......
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