From 613aa36b03a77142fe68798ffae002f31958cca7 Mon Sep 17 00:00:00 2001 From: winem Date: Wed, 17 Feb 2021 23:24:12 +0100 Subject: [PATCH 1/3] Improve the error handling on the Makefile and don't rely on a fix string as prefix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d112b13..8c16dace 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ endif verify_tag_update_flag: ifeq ($(RELEASE_VERSION), true) -ifneq ($(shell echo "${TAG_UPDATE_FLAG}" | grep -E "Error:"),) +ifneq ($(shell echo "${TAG_UPDATE_FLAG}" | grep -vE "^[1-3]"),) @echo -e "Failed to identify the tags to be set." @echo -e "\033[31mNo images were tagged due to an error when determining the correct tags: ${TAG_UPDATE_FLAG}\033[0m" exit 1 From c7d72cb9e66fe471391bdd77ac3ec63c85164b92 Mon Sep 17 00:00:00 2001 From: winem Date: Wed, 17 Feb 2021 23:31:40 +0100 Subject: [PATCH 2/3] Handle comment regarding the supported output for future maintainers --- determine_needed_tags.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/determine_needed_tags.sh b/determine_needed_tags.sh index a8917389..5c590b5e 100755 --- a/determine_needed_tags.sh +++ b/determine_needed_tags.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# See showHelp() for the supported output values if everything goes fine. +# $(make) will handle any other output as unexpected and assume an error. +# Use this to raise error and cause the CI to fail. + # the first argument must be the name of the container, i.e. st2, st2actionrunner, st2stream component=$1 # the 2nd argument is the version of the current build and expects at least major.miinor to be provided From c9baf0ba03e73a966ba0f74d0dc4dd9118f0cf8c Mon Sep 17 00:00:00 2001 From: winem Date: Wed, 17 Feb 2021 23:32:01 +0100 Subject: [PATCH 3/3] Update the supported values to include 0 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8c16dace..68ad2f70 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ endif verify_tag_update_flag: ifeq ($(RELEASE_VERSION), true) -ifneq ($(shell echo "${TAG_UPDATE_FLAG}" | grep -vE "^[1-3]"),) +ifneq ($(shell echo "${TAG_UPDATE_FLAG}" | grep -vE "^[0-3]"),) @echo -e "Failed to identify the tags to be set." @echo -e "\033[31mNo images were tagged due to an error when determining the correct tags: ${TAG_UPDATE_FLAG}\033[0m" exit 1