phase1: fetch before checking out git branch
authorJo-Philipp Wich <jo@mein.io>
Tue, 14 Mar 2017 12:58:05 +0000 (13:58 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Mar 2017 12:58:05 +0000 (13:58 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase1/master.cfg

index 992e01eef2924fa5651bc44c9bb9f313284c7ff7..991039ffc1b684ed350eb9cafbc8286fbbb7c65e 100644 (file)
@@ -400,7 +400,7 @@ for target in targets:
        factory.addStep(ShellCommand(
                name = "switchbranch",
                description = "Checking out Git branch",
-               command = "if [ -d .git ]; then git checkout '%s'; else exit 0; fi" % repo_branch,
+               command = "if [ -d .git ]; then git fetch --depth=1 && git checkout '%s'; else exit 0; fi" % repo_branch,
                haltOnFailure = True,
                doStepIf = IsNoTaggingRequested
        ))