Skip to content

Commit

Permalink
Merge pull request #2620 from SpaceFox/update_deploy_script
Browse files Browse the repository at this point in the history
Script qui permet d'avoir toujours la bonne version du script de déploiement
  • Loading branch information
SpaceFox committed May 12, 2015
2 parents fb0cb8e + 31630dc commit 85e62f9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/install/deploy-in-production.rst
Expand Up @@ -345,7 +345,7 @@ Ajouter les métriques suivantes au fichier ``/etc/munin/plugin-conf.d/munin-nod
Mise à jour d'une instance existante
====================================

`Allez jeter un coup d'oeil à notre script de déploiement <https://github.com/zestedesavoir/zds-site/blob/dev/scripts/deploy.sh>` ! ;)
`Allez jeter un coup d'oeil à notre script de déploiement <https://github.com/zestedesavoir/zds-site/blob/dev/scripts/update_and_deploy.sh>` ! ;) (lequel appelle `le véritable script de déploiement <https://github.com/zestedesavoir/zds-site/blob/dev/scripts/deploy.sh>`).

Personnalisation d'une instance
===============================
Expand Down
29 changes: 29 additions & 0 deletions scripts/update_and_deploy.sh
@@ -0,0 +1,29 @@
#!/bin/bash
#
# Zeste de Savoir deployment script updater
#
# Updates the ZdS deployment script and launch it
#
# Usage:
# - This script must be run by zds user
# - This script has exactly 1 parameter: the tag name to deploy
#
# ANY MODIFICATION OF THIS SCRIPT MUST BE SPECIFIED IN THE update.md FILE!

if [ "$(whoami)" != "zds" ]; then
echo "This script must be run by zds user" >&2
exit 1
fi

if [ "$#" -ne 1 ]; then
echo "Usage: $0 <tag name>" >&2
exit 1
fi
echo "Delete the old deployment script"
rm -f deploy.sh
echo "Get the last version of the deployment script"
wget https://raw.githubusercontent.com/zestedesavoir/zds-site/$1/scripts/deploy.sh
chmod +x deploy.sh
echo "Run the deployment procedure..."
./deploy.sh $@

0 comments on commit 85e62f9

Please sign in to comment.