改用git tag --sort=committerdate | tail -1获取tag

This commit is contained in:
VillagerTom
2024-06-10 14:08:37 +08:00
committed by orz12
parent 72ba9f7062
commit 695b99de48

View File

@@ -44,7 +44,7 @@ jobs:
id: get-previous-codes
run: |
version=$(yq e .version pubspec.yaml | cut -d "+" -f 1)
last_tag=$(git describe --tags | awk -F"-" '{for(i=1;i<=NF-2;i++) printf "%s", $i}')
last_tag=$(git tag --sort=committerdate | tail -1)
if $(echo $last_tag | grep -v "+"); then
echo "Tag格式不正确"
exit 1