Skip to content

Commit

Permalink
Issue #5: Supprime la branche locale si elle existe déjà (redeploy) +…
Browse files Browse the repository at this point in the history
… diminution du niveau de log de npm update + info en fin de deploy
  • Loading branch information
SpaceFox committed Jul 30, 2014
1 parent 8fa5852 commit 3f7c431
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions server/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ sudo rm /etc/nginx/sites-enabled/zestedesavoir
sudo ln -s /etc/nginx/sites-available/zds-maintenance /etc/nginx/sites-enabled/zds-maintenance
sudo service nginx reload

# Delete old branch if exists
git checkout prod
git branch -D $1
# Switch to new tag
git fetch --tags
# Server has git < 1.9, git fetch --tags doesn't retrieve commits...
Expand All @@ -35,8 +38,8 @@ git checkout -b $1

# Compute front stuff
source /usr/local/nvm/nvm.sh
sudo npm update
sudo npm update bower gulp -g
sudo npm -q update
sudo npm -q update bower gulp -g
gulp pack

# Update application data
Expand All @@ -52,3 +55,7 @@ sudo supervisorctl restart zds
sudo rm /etc/nginx/sites-enabled/zds-maintenance
sudo ln -s /etc/nginx/sites-available/zestedesavoir /etc/nginx/sites-enabled/zestedesavoir
sudo service nginx reload

# Display current branch and commit
git status
echo "Commit deployé : `git rev-parse HEAD`"

0 comments on commit 3f7c431

Please sign in to comment.