phase1: checkout configured branch
authorJo-Philipp Wich <jo@mein.io>
Mon, 15 Jul 2019 08:36:15 +0000 (10:36 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 15 Jul 2019 08:36:15 +0000 (10:36 +0200)
Also fixup the remote since the Git() step does not properly set
it in all cases.

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

index 676bfe2235680a15fadeb8016237ba914abaec15..a8abbc607ef51a05fc10f2d7ab2f453be288c02e 100644 (file)
@@ -569,7 +569,7 @@ for target in targets:
        factory.addStep(ShellCommand(
                name = "gitcheckout",
                description = "Ensure that Git HEAD is sane",
-               command = "if [ -d .git ]; then git checkout master; else exit 0; fi",
+               command = "if [ -d .git ]; then git checkout %s; git branch --set-upstream-to origin/%s; else exit 0; fi" %(repo_branch, repo_branch),
                haltOnFailure = True))
 
        # check out the source