Skip to content

Instantly share code, notes, and snippets.

@cosemansp
Created January 31, 2015 10:19
Show Gist options
  • Save cosemansp/f608b8d9086b610afbef to your computer and use it in GitHub Desktop.
Save cosemansp/f608b8d9086b610afbef to your computer and use it in GitHub Desktop.
Azure node deploy
# Deployment
# ----------
echo Handling node.js grunt deployment.
# 1. Select node version
selectNodeVersion
# 2. Install npm packages
if [ -e "$DEPLOYMENT_SOURCE/package.json" ]; then
eval $NPM_CMD install
exitWithMessageOnError "npm failed"
fi
# 3. Install bower packages
if [ -e "$DEPLOYMENT_SOURCE/bower.json" ]; then
eval $NPM_CMD install bower
exitWithMessageOnError "installing bower failed"
./node_modules/.bin/bower install
exitWithMessageOnError "bower failed"
fi
# 4. Run grunt
if [ -e "$DEPLOYMENT_SOURCE/Gruntfile.js" ]; then
eval $NPM_CMD install grunt-cli
exitWithMessageOnError "installing grunt failed"
./node_modules/.bin/grunt --no-color clean common dist
exitWithMessageOnError "grunt failed"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment