From 40dda8edfc5a3ed49fc99ed638a4578219080108 Mon Sep 17 00:00:00 2001 From: leafus Date: Sun, 29 Sep 2024 04:46:37 +0200 Subject: [PATCH] Update .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index f80b060..fad866b 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -39,10 +39,9 @@ jobs: latest_version=$(git describe --tags --abbrev=0 || echo "v0.0.0") new_version=$(echo $latest_version | awk -F. '{printf "v%d.%d.%d", $1, $2, $3+1}') - if git rev-parse "$new_version" >/dev/null 2>&1; then - echo "Tag $new_version already exists. Exiting." - exit 1 - fi + while git rev-parse "$new_version" >/dev/null 2>&1; do + new_version=$(echo $new_version | awk -F. '{$3+=1; printf "v%d.%d.%d", $1, $2, $3}') + done echo "new_version=$new_version" >> $GITHUB_ENV