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(