[buildbot] phase1: fetch before checking out git branch

LEDE Commits lede-commits at lists.infradead.org
Tue Mar 14 05:58:09 PDT 2017


jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/eeab554e74b99a7c46f705b02d4b16ec1e2bd337

commit eeab554e74b99a7c46f705b02d4b16ec1e2bd337
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Mar 14 13:58:05 2017 +0100

    phase1: fetch before checking out git branch
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 phase1/master.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index 992e01e..991039f 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -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
 	))



More information about the lede-commits mailing list