phase1: manually fetch remote Git refs
authorJo-Philipp Wich <jo@mein.io>
Wed, 14 Dec 2016 17:28:58 +0000 (18:28 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 14 Dec 2016 17:28:58 +0000 (18:28 +0100)
Buildbot never updates the remote branch reference on incremental updates,
causing scripts/getver.sh to assume a dirty tree with unpublished local
commits.

Add a manual command step to update the remote branch ref in order to bring
the remote tracking branch history in sync with the local branch.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase1/master.cfg

index dc1e66de7203ed4445305dac187e96f052b3d176..b9bbf1214839ee08e410e7a3c48c1b66473f0632 100644 (file)
@@ -330,6 +330,14 @@ for target in targets:
                mode = 'incremental',
                method = 'clean'))
 
+       # update remote refs
+       factory.addStep(ShellCommand(
+               name = "fetchrefs",
+               description = "Fetching Git remote refs",
+               command = ["git", "fetch", "origin", "+refs/heads/%s:refs/remotes/origin/%s" %(repo_branch, repo_branch)],
+               haltOnFailure = True
+       ))
+
        # fetch tags
        factory.addStep(ShellCommand(
                name = "fetchtag",