phase1: don't fail if Git is not yet cloned
authorJo-Philipp Wich <jo@mein.io>
Wed, 30 Nov 2016 20:17:46 +0000 (21:17 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 30 Nov 2016 20:17:46 +0000 (21:17 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase1/master.cfg

index e44535930f13af4cb66ec6d9251652d31a6753c6..12f73932f3da0d93ec3b57e72ababba0c5bf3dec 100644 (file)
@@ -316,7 +316,7 @@ for target in targets:
        factory.addStep(ShellCommand(
                name = "switchbranch",
                description = "Checking out Git branch",
-               command = ["git", "checkout", repo_branch],
+               command = "if [ -d .git ]; then git checkout '%s'; else exit 0; fi" % repo_branch,
                haltOnFailure = True,
                doStepIf = IsNoTaggingRequested
        ))