CI: build: fix external toolchain use with release tag tests

When a new tag for a release is created, the just checkout repo from
github actions will already have such tag locally created.

This will result in git fetch --tags failing with error rejecting the
remote tag with (would clobber existing tag).

Add -f option to overwrite any local tags and always fetch them from
remote.

Fixes: e24a1e6f6d ("CI: build: add support for external toolchains from stable branch")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit f655923b36)
This commit is contained in:
Christian Marangi 2023-01-04 19:26:16 +01:00
parent ee1eda7c7d
commit e819523f90
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ jobs:
fi
if [ -n "$major_ver" ]; then
git fetch --tags
git fetch --tags -f
latest_tag="$(git tag --sort=-creatordate -l $major_ver* | head -n1)"
if [ -n "$latest_tag" ]; then
TOOLCHAIN_PATH=releases/$(echo $latest_tag | sed 's/^v//')