From 77757fdde33f277b3a8f8e2d2eefb7bdd7b667d8 Mon Sep 17 00:00:00 2001 From: "artem.artemkin" Date: Wed, 27 Dec 2023 16:40:48 +0300 Subject: [PATCH] split --- .github/workflows/create-tag.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml index fef050e..4b85246 100644 --- a/.github/workflows/create-tag.yml +++ b/.github/workflows/create-tag.yml @@ -17,10 +17,12 @@ jobs: - name: create tag run: | - latestVersion="$(git describe --tags $(git rev-list --tags --max-count=1))" - if [ -z "$latestVersion" ]; then + revlist="$(git rev-list --tags --max-count=1)" + if [ -z "$revlist" ]; then latestVersion="1.0.0" - fi + else + latestVersion="$(git describe --tags "$revlist")" + fi latestVersionPrefix="$(awk -F'.' '{ $NF=""; print }' <<< "$latestVersion" | tr " " ".")" latestMinorVersion="$(sed "s/$latestVersionPrefix//g" <<< "$latestVersion")"