diff --git a/get-mods.sh b/get-mods.sh index 9414977..b77d3d3 100755 --- a/get-mods.sh +++ b/get-mods.sh @@ -5,7 +5,11 @@ set -exo pipefail BRANCH="$1" get_tag () { - git -C dockerweb2-temp tag --sort=-version:refname |grep -vFe - |head -n 1 + if git -C dockerweb2-temp tag |grep -qvFe -; then # ex. RCs + git -C dockerweb2-temp tag --sort=-version:refname |grep -vFe - |head -n 1 + else + git -C dockerweb2-temp tag --sort=-version:refname |grep -Fe - |head -n 1 + fi } get_special () { @@ -14,9 +18,6 @@ get_special () { git clone --bare "https://github.com/Icinga/${1}.git" dockerweb2-temp case "$2" in - icingaweb2/modules/icingadb) - REF=2c0662c420617712bd26234da550dcf8d4afcdb8 # v1.0.0-rc1+ - ;; icingaweb2/modules/incubator) REF="$(get_tag)" ;; @@ -25,6 +26,10 @@ get_special () { REF="$BRANCH" else REF="$(get_tag)" + + if [ "$2" = icingaweb2/modules/icingadb ] && [ "$REF" = 'v1.0.0-rc1' ]; then + REF=2c0662c420617712bd26234da550dcf8d4afcdb8 # v1.0.0-rc1+ + fi fi ;; esac