Make the revision param for deployments optional

The deployment script now uses the current revision of the set branch in this case. Does not work together with a custom value of $CONFIG_HASH_LENGTH though.
This commit is contained in:
2015-09-11 23:24:43 +02:00
parent 11f05ab078
commit bb033b58cc
3 changed files with 67 additions and 28 deletions
+4 -3
View File
@@ -6,18 +6,19 @@
# .postdeploy.sh in the repository (if existing) and links the version
# as current.
#
# Usage: site_deploy <site> <revision>
# Usage: site_deploy <site> [<revision>]
#
# <site> Name of the site (directory in ~/web/sites/)
# <revision> SHA-1 commit hash of the revision to checkout
# Defaults to the latest commit on the set branch
########################################################################
site="$1"
revision="$2"
if [[ -z "$revision" ]]; then
if [[ -z "$site" ]]; then
# Print help
echo -e "\033[1mUsage:\033[0m \033[34msite_deploy\033[0m <site> <revision>"
echo -e "\033[1mUsage:\033[0m \033[34msite_deploy\033[0m <site> [<revision>]"
exit 1
fi