[buildbot] phase1: satisfy getver.sh requirements
LEDE Commits
lede-commits at lists.infradead.org
Tue May 23 12:36:25 PDT 2023
ynezz pushed a commit to buildbot.git, annotated tag v6:
https://git.openwrt.org/2b415c0b17e9b96ea2933206a3466b8a52e32b35
commit 2b415c0b17e9b96ea2933206a3466b8a52e32b35
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Tue May 23 20:12:09 2023 +0200
phase1: satisfy getver.sh requirements
scripts/getver.sh requires upstream branch tracking to correctly compute
revision number. Buildbot Git() step does not set branch tracking as it
checks out individual commits and then reset the target branch to it, so
in order for getver.sh to work, this workaround forcefully sets the
upstream branch.
This fixes malformed version code in filenames as observed on
openwrt-23.05:
r23001+3-38c150612c
instead of:
r23004-7f0db09513
Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
phase1/master.cfg | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index bbd3734..4fb28b6 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -744,6 +744,16 @@ for target in targets:
haltOnFailure = True,
))
+ # getver.sh requires local branches to track upstream otherwise version computation fails.
+ # Git() does not set tracking branches when cloning or switching, so work around this here
+ factory.addStep(ShellCommand(
+ name = "trackupstream",
+ description = "Setting upstream branch",
+ descriptionDone = "getver.sh is happy now",
+ command = ["git", "branch", "-u", Interpolate("origin/%(prop:branch)s")],
+ haltOnFailure = True,
+ ))
+
# Verify that Git HEAD points to a tag or branch
# Ref: https://web.archive.org/web/20190729224316/http://lists.infradead.org/pipermail/openwrt-devel/2019-June/017809.html
factory.addStep(ShellCommand(
More information about the lede-commits
mailing list