diff --git a/.gitea/workflows/linux_arm64_docker.yaml b/.gitea/workflows/linux_arm64_docker.yaml index b7bb6cd..e6c7a9c 100644 --- a/.gitea/workflows/linux_arm64_docker.yaml +++ b/.gitea/workflows/linux_arm64_docker.yaml @@ -33,13 +33,14 @@ jobs: git fetch --force --tags origin git fetch --force origin main:refs/remotes/origin/main - LAST_TAG=$(git log --first-parent --decorate=short --simplify-by-decoration --oneline origin/main \ - | grep -oE 'tag: v[^,)]+' \ - | head -n 1 \ - | sed 's/tag: //') + LAST_TAG=$(git for-each-ref \ + --sort=-creatordate \ + --format='%(refname:strip=2)' \ + refs/tags/v* \ + | head -n 1) if [[ -z "${LAST_TAG:-}" ]]; then - echo "No release tag found" + echo "No tag found" exit 1 fi @@ -61,7 +62,7 @@ jobs: echo "Last tag: $LAST_TAG" echo "Last tag commit: $LAST_COMMIT" - echo "Distance to origin/main (first-parent): $DISTANCE" + echo "Distance to origin/main: $DISTANCE" echo "Final version: $VERSION" - name: Set .NET version variables