From 65b2889468226c15fafd48ef8523d86c80d12197 Mon Sep 17 00:00:00 2001 From: Adrian Suarez Date: Sat, 3 Feb 2024 10:45:22 -0500 Subject: [PATCH] Abort workflow if tag does not have format v.. --- scripts/update-release.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/update-release.sh b/scripts/update-release.sh index 20e2dc2..cb77492 100755 --- a/scripts/update-release.sh +++ b/scripts/update-release.sh @@ -25,11 +25,11 @@ fi # Checkout correct branch for release case "$TAG" in - (*.0) + (v*.0) # Branch latest tracks ..0 releases git checkout latest ;; - (*) + (v*) # Branch v.-dev tracks patch releases PREFIX="${TAG%.*}" BRANCH="${PREFIX}-dev" @@ -51,6 +51,9 @@ case "$TAG" in fi fi ;; + (*) + echo "Tag $TAG does not have format v... Aborting workflow..." + exit 1 esac # Download latest OpenAPI spec and CLI doc, and update if necessary