Skip to content

Commit

Permalink
CI: build: fix external toolchain use with release tag tests
Browse files Browse the repository at this point in the history
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: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch")
Signed-off-by: Christian Marangi <[email protected]>
(cherry picked from commit f655923b362e9f2d70672eee9c1fa82550a145a6)
  • Loading branch information
Ansuel committed Jan 4, 2023
1 parent b08e1e9 commit 7c10b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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//')
Expand Down

0 comments on commit 7c10b7b

Please sign in to comment.