From f182e8bc71e7fe3436bb6166d1d8e624ab115f4a Mon Sep 17 00:00:00 2001 From: Bryce Thorup Date: Fri, 15 Dec 2023 06:44:45 -0700 Subject: [PATCH] a --- action.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/action.sh b/action.sh index 7970cdc..41b0ac3 100755 --- a/action.sh +++ b/action.sh @@ -1,9 +1,9 @@ apt update apt install jq -y -# CURRENT_VERSION=$(jq -r .version package.json) -# PREVIOUS_VERSIONS=$(git tag -l) +CURRENT_VERSION=$(jq -r .version package.json) +PREVIOUS_VERSIONS=$(git tag -l) -# if [[ $PREVIOUS_VERSIONS =~ (^|[[:space:]])$CURRENT_VERSION($|[[:space:]]) ]]; then -# git tag -a -m "Version $(CURRENT_VERSION)" $CURRENT_VERSION -# git push --follow-tags -# fi \ No newline at end of file +if [[ $PREVIOUS_VERSIONS =~ (^|[[:space:]])$CURRENT_VERSION($|[[:space:]]) ]]; then + git tag -a -m "Version $(CURRENT_VERSION)" $CURRENT_VERSION + git push --follow-tags +fi \ No newline at end of file