From 695b99de4867da121a130922dddc6a87dea78b3a Mon Sep 17 00:00:00 2001 From: VillagerTom Date: Mon, 10 Jun 2024 14:08:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E7=94=A8`git=20tag=20--sort=3Dcommitt?= =?UTF-8?q?erdate=20|=20tail=20-1`=E8=8E=B7=E5=8F=96tag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 99657c22..1692ab98 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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