diff --git a/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh b/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh index 9802a083d5..fd56e0952b 100755 --- a/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh +++ b/roles/copy-release-tools-scripts/files/release-tools/make_branch.sh @@ -55,10 +55,15 @@ if $(git tag | grep ${NEW_BRANCH/\//-}-eol > /dev/null); then cleanup_and_exit fi -# Skip stable/ or unmaintained/ branch creation in case -# -eol tag exists -if $(git tag | grep ${NEW_BRANCH//@(stable\/|unmaintained\/)}-eol >/dev/null); then - echo "A ${NEW_BRANCH//@(stable\/|unmaintained\/)}-eol tag already exists !" +# Skip stable/ branch creation in case -eol tag exists +if $(git tag | grep ${NEW_BRANCH#stable/}-eol >/dev/null); then + echo "A ${NEW_BRANCH#stable/}-eol tag already exists !" + cleanup_and_exit +fi + +# Skip unmaintained/ branch creation in case -eol tag exists +if $(git tag | grep ${NEW_BRANCH#unmaintained/}-eol >/dev/null); then + echo "A ${NEW_BRANCH#unmaintained/}-eol tag already exists !" cleanup_and_exit fi