From 37f81815b9fafe1c12c121853b207db07260203c Mon Sep 17 00:00:00 2001 From: Bryce Thorup Date: Fri, 15 Dec 2023 06:53:48 -0700 Subject: [PATCH] s --- action.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.sh b/action.sh index 433830b..00542fc 100755 --- a/action.sh +++ b/action.sh @@ -5,7 +5,7 @@ echo $CURRENT_VERSION PREVIOUS_VERSIONS=$(git tag -l) echo $PREVIOUS_VERSIONS -if [[ $PREVIOUS_VERSIONS =~ (^|[[:space:]])$CURRENT_VERSION($|[[:space:]]) ]]; then +if [[ -z "$PREVIOUS_VERSIONS" ] || [ $PREVIOUS_VERSIONS =~ (^|[[:space:]])$CURRENT_VERSION($|[[:space:]]) ]]; then echo "Tag for version $(CURRENT_VERSION) not found. Creating tag..." git tag -a -m "Version $(CURRENT_VERSION)" $CURRENT_VERSION git push --follow-tags