Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2620 from SpaceFox/update_deploy_script
Script qui permet d'avoir toujours la bonne version du script de déploiement
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 $@ | ||
|