Add label generation checking
All checks were successful
continuous-integration/drone/push Build is passing

Closes https://git.autonomic.zone/coop-cloud/abra/issues/186.
This commit is contained in:
2021-07-06 12:27:06 +02:00
parent 78287fec37
commit cdd196346a
2 changed files with 6 additions and 0 deletions

5
abra
View File

@ -2283,6 +2283,11 @@ sub_recipe_release() {
error "Hmm, something went wrong generating a new version number.."
fi
local -a expected_format="^coop-cloud.[a-z]*.[a-z]*.[a-z]*=v\\d*.\\d*.\\d*-\\S{8}"
if [[ ! "$new_version" =~ $expected_format ]]; then
error "'$new_version' does not match the expected label format, bailing out..."
fi
success "All compose files updated; new version is $new_version"
if [ "$abra___no_prompt" = "false" ] && [ "$bump" = "false" ]; then