[buildbot] phase1: gitcheckout workaround is no longer needed
LEDE Commits
lede-commits at lists.infradead.org
Mon May 15 08:39:32 PDT 2023
ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/69f2ac5acf9432a19af42037e6a89e90d2cf1fe1
commit 69f2ac5acf9432a19af42037e6a89e90d2cf1fe1
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Tue Oct 25 21:58:53 2022 +0200
phase1: gitcheckout workaround is no longer needed
And it has adverse effects (slows/breaks Git step).
Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
phase1/master.cfg | 17 ++++++-----------
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 86d858d..61de307 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -605,19 +605,14 @@ for target in targets:
hideStepIf = lambda r, s: r==results.FAILURE,
))
- # Workaround bug when switching from a checked out tag back to a branch
- # Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html
- factory.addStep(ShellCommand(
- name = "gitcheckout",
- description = "Ensure that Git HEAD is sane",
- command = Interpolate("if [ -d .git ]; then git checkout -f %(prop:branch)s && git branch --set-upstream-to origin/%(prop:branch)s || rm -fr .git; else exit 0; fi"),
- haltOnFailure = True))
-
# check out the source
# Git() runs:
# if repo doesn't exist: 'git clone repourl'
- # method 'clean' runs 'git clean -d -f', method fresh runs 'git clean -d -f x'. Only works with mode='full'
- # 'git fetch -t repourl branch; git reset --hard revision'
+ # method 'clean' runs 'git clean -d -f', method fresh runs 'git clean -f -f -d -x'. Only works with mode='full'
+ # git cat-file -e <commit>
+ # git checkout -f <commit>
+ # git checkout -B <branch>
+ # git rev-parse HEAD
factory.addStep(Git(
name = "git",
repourl = repo_url,
@@ -645,7 +640,7 @@ for target in targets:
))
# Verify that Git HEAD points to a tag or branch
- # Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html
+ # Ref: https://web.archive.org/web/20190729224316/http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html
factory.addStep(ShellCommand(
name = "gitverify",
description = "Ensure that Git HEAD is pointing to a branch or tag",
More information about the lede-commits
mailing list