From cbf4d848cf5f152a0c3a41facb7f1ec2d3120081 Mon Sep 17 00:00:00 2001 From: Enguerrand de Ribaucourt Date: Tue, 28 May 2024 15:35:16 +0200 Subject: [PATCH] CI: Make tags sorting commands more robust If the version would go above 10, then alphabetic sorting would not properly find the latest tag. --- scripts/update-ref.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/update-ref.sh b/scripts/update-ref.sh index 26081c2c..ac166bee 100644 --- a/scripts/update-ref.sh +++ b/scripts/update-ref.sh @@ -59,7 +59,7 @@ echo "" >> $FILE git clone --depth 1 --filter=blob:none --sparse https://github.com/openembedded/bitbake.git cd bitbake git fetch --tags -TMP_TAG=$(git tag | tail -n 1) +TMP_TAG=$(git tag --sort=-v:refname | head -n 1) LASTEST_RELEASE=$(git show $TMP_TAG | grep commit | sed "s/^commit //") echo "# Tag: $TMP_TAG" >> ../$FILE echo "BITBAKE_DOCS_COMMIT=$LASTEST_RELEASE" >> ../$FILE @@ -69,7 +69,7 @@ rm -rf bitbake git clone --depth 1 --filter=blob:none --sparse https://git.yoctoproject.org/yocto-docs cd yocto-docs git fetch --tags -TMP_TAG=$(git tag | tail -n 1) +TMP_TAG=$(git tag --sort=-v:refname | head -n 1) LASTEST_RELEASE=$(git show $TMP_TAG | grep commit | sed "s/^commit //") echo "# Tag: $TMP_TAG" >> ../$FILE echo "YOCTO_DOCS_COMMIT=$LASTEST_RELEASE" >> ../$FILE