diff --git a/src/releasing/pre-release-checks-git.sh b/src/releasing/pre-release-checks-git.sh index 97e90511..ace8c586 100755 --- a/src/releasing/pre-release-checks-git.sh +++ b/src/releasing/pre-release-checks-git.sh @@ -56,13 +56,9 @@ function preReleaseCheckGit() { ) parseArguments params "" "$TEGONAL_SCRIPTS_VERSION" "$@" - if ! [[ -v branch ]]; then branch="main"; fi exitIfNotAllArgumentsSet params "" "$TEGONAL_SCRIPTS_VERSION" - - if ! [[ "$version" =~ $versionRegex ]]; then - die "%s should match vX.Y.Z(-RC...), was %s" "$versionParamPatternLong" "$version" - fi + exitIfArgIsNotVersion "$version" "$versionParamPatternLong" exitIfGitHasChanges diff --git a/src/releasing/prepare-next-dev-cycle-template.sh b/src/releasing/prepare-next-dev-cycle-template.sh index 33e5e6cd..c8f0a8cd 100755 --- a/src/releasing/prepare-next-dev-cycle-template.sh +++ b/src/releasing/prepare-next-dev-cycle-template.sh @@ -93,10 +93,7 @@ function prepareNextDevCycleTemplate() { if ! [[ -v beforePrFn ]]; then beforePrFn="beforePr"; fi if ! [[ -v afterVersionUpdateHook ]]; then afterVersionUpdateHook=''; fi exitIfNotAllArgumentsSet params "" "$TEGONAL_SCRIPTS_VERSION" - - if ! [[ "$version" =~ $versionRegex ]]; then - die "version should match vX.Y.Z(-RC...), was %s" "$version" - fi + exitIfArgIsNotVersion "$version" "$versionParamPatternLong" exitIfArgIsNotFunction "$beforePrFn" "$beforePrFnParamPatternLong" exitIfGitHasChanges