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 if [ $NODE_ENV == 'production' ]; then
mkdir -p /root/.ssh # Deploy key for private npm modules
cp deploy_key /root/.ssh/id_rsa mkdir -p /root/.ssh
chmod 400 /root/.ssh/id_rsa cp deploy_key /root/.ssh/id_rsa
cp ssh_config /root/.ssh/config chmod 400 /root/.ssh/id_rsa
cp ssh_config /root/.ssh/config
fi
# System dependencies # System dependencies
apt-get -q update apt-get -q update

View File

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