From fd1c422139541cdc0c865858a980722ab66a1dba Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 7 Jul 2021 18:27:10 +0200 Subject: [PATCH 1/2] get_tag(): fall back to RC --- get-mods.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/get-mods.sh b/get-mods.sh index 9414977..d7971dd 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 () { From 4cade484751d5749569011c69fdaa45cb94b369e Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 7 Jul 2021 18:28:17 +0200 Subject: [PATCH 2/2] get_special(): pin icingadb-web commit only for v1.0.0-rc1 --- get-mods.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/get-mods.sh b/get-mods.sh index d7971dd..b77d3d3 100755 --- a/get-mods.sh +++ b/get-mods.sh @@ -18,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)" ;; @@ -29,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