[openwrt/openwrt] CI: build: fix external toolchain use with release tag tests
LEDE Commits
lede-commits at lists.infradead.org
Wed Jan 4 10:39:11 PST 2023
ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/e819523f907480985caf62ff885a16f6e669be07
commit e819523f907480985caf62ff885a16f6e669be07
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Jan 4 19:26:16 2023 +0100
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: e24a1e6f6d7f ("CI: build: add support for external toolchains from stable branch")
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
(cherry picked from commit f655923b362e9f2d70672eee9c1fa82550a145a6)
---
.github/workflows/build.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1c665cb869..ce8f30dd18 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -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//')
More information about the lede-commits
mailing list