Skip to content

Commit

Permalink
CI: Make tags sorting commands more robust
Browse files Browse the repository at this point in the history
If the version would go above 10, then alphabetic sorting would not
properly find the latest tag.
  • Loading branch information
deribaucourt committed May 28, 2024
1 parent 3f46b01 commit cbf4d84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/update-ref.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cbf4d84

Please sign in to comment.