Created
January 31, 2015 10:19
-
-
Save cosemansp/f608b8d9086b610afbef to your computer and use it in GitHub Desktop.
Azure node deploy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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