Add production mode guards.

This commit is contained in:
Pagan Gazzard 2014-08-01 16:20:58 +01:00 committed by Pablo Carranza Vélez
parent 3bad30eff7
commit 0495053fd5
2 changed files with 12 additions and 8 deletions

12
deps.sh
View File

@ -1,8 +1,10 @@
# Deploy key for private npm modules
mkdir -p /root/.ssh
cp deploy_key /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa
cp ssh_config /root/.ssh/config
if [ $NODE_ENV == 'production' ]; then
# Deploy key for private npm modules
mkdir -p /root/.ssh
cp deploy_key /root/.ssh/id_rsa
chmod 400 /root/.ssh/id_rsa
cp ssh_config /root/.ssh/config
fi
# System dependencies
apt-get -q update

View File

@ -1,3 +1,5 @@
node ./node_modules/coffee-script/bin/coffee -c ./src
rm -rf /root/.ssh/* /build/app/deploy_key /app/deploy_key /build/app/Makefile /app/Makefile /app/src/*.coffee
npm uninstall coffee-script
if [ $NODE_ENV == 'production' ]; then
node ./node_modules/coffee-script/bin/coffee -c ./src
rm -rf /root/.ssh/* /build/app/deploy_key /app/deploy_key /build/app/Makefile /app/Makefile /app/src/*.coffee
npm uninstall coffee-script
fi