[buildbot] phase1: don't fail if Git is not yet cloned

LEDE Commits lede-commits at lists.infradead.org
Wed Nov 30 12:17:51 PST 2016


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

commit f83f466d2f77dbb214aef95e50cc9b0b0c54184d
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Wed Nov 30 21:17:46 2016 +0100

    phase1: don't fail if Git is not yet cloned
    
    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 e445359..12f7393 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -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
 	))



More information about the lede-commits mailing list