Skip to content

Commit

Permalink
Merge branch 'fix/deploy' into wip/clock/init
Browse files Browse the repository at this point in the history
  • Loading branch information
bewest committed Jul 27, 2014
2 parents aac2dcf + 5127fda commit c7def83
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# ----------------------
# KUDU Deployment Script
# Version: 0.1.10
# Version: 0.1.11
# ----------------------

# Helpers
Expand Down Expand Up @@ -100,32 +100,22 @@ selectNodeVersion () {

echo Handling node.js deployment.

# 1. Select node version
# 1. KuduSync
if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then
"$KUDU_SYNC_CMD" -v 50 -f "$DEPLOYMENT_SOURCE" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
exitWithMessageOnError "Kudu Sync failed"
fi

# 2. Select node version
selectNodeVersion

# 2. Install npm packages
if [ -e "$DEPLOYMENT_SOURCE/package.json" ]; then
# cd "$DEPLOYMENT_SOURCE"
eval $NPM_CMD set ca ""
# 3. Install npm packages
if [ -e "$DEPLOYMENT_TARGET/package.json" ]; then
cd "$DEPLOYMENT_TARGET"
eval $NPM_CMD install --production
exitWithMessageOnError "npm failed"
# cd - > /dev/null
cd - > /dev/null
fi
if [ -e "$DEPLOYMENT_SOURCE/bower.json" ]; then
# cd "$DEPLOYMENT_SOURCE"
./node_modules/.bin/bower install
exitWithMessageOnError "bower failed"
# cd - > /dev/null
fi

# 3. KuduSync
# if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then
# "$KUDU_SYNC_CMD" -v 50 -f "$DEPLOYMENT_SOURCE" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
# exitWithMessageOnError "Kudu Sync failed"
# fi
# 3. KuduSync to Target
"$KUDU_SYNC_CMD" -v 500 -f "$DEPLOYMENT_SOURCE/" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
exitWithMessageOnError "Kudu Sync to Target failed"

##################################################################################################################################

Expand Down

0 comments on commit c7def83

Please sign in to comment.