phase1: do not perform shallow fetches
[buildbot.git] / phase1 / master.cfg
index fa671aa8a14c1b79b49d78ad8b14c79154ed7bcd..04879e800f6ebfa17470714bc679dc1ccfc178b7 100644 (file)
@@ -194,7 +194,7 @@ def IsCleanRequested(pattern):
 
 def IsTaggingRequested(step):
        val = step.getProperty("tag")
-       if val and re.match("^[0-9]+\.[0-9]+\.[0-9]+$", val):
+       if val and re.match("^[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", val):
                return True
        else:
                return False
@@ -213,7 +213,7 @@ def GetBaseVersion(props):
 
 def GetVersionPrefix(props):
        basever = GetBaseVersion(props)
-       if props.hasProperty("tag") and re.match("^[0-9]+\.[0-9]+\.[0-9]+$", props["tag"]):
+       if props.hasProperty("tag") and re.match("^[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", props["tag"]):
                return "%s/" % props["tag"]
        elif basever != "master":
                return "%s-SNAPSHOT/" % basever
@@ -246,6 +246,12 @@ def GetCwd(props):
        else:
                return "/"
 
+def GetNextBuild(builder, requests):
+       for r in requests:
+               if r.properties and r.properties.hasProperty("tag"):
+                       return r
+       return requests[0]
+
 def MakeEnv(overrides=None):
        env = {
                'CC': WithProperties("%(cc)s", cc=GetCC),
@@ -394,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 && git checkout '%s'; else exit 0; fi" % repo_branch,
                haltOnFailure = True,
                doStepIf = IsNoTaggingRequested
        ))
@@ -539,7 +545,7 @@ for target in targets:
        factory.addStep(ShellCommand(
                name = "dltar",
                description = "Building GNU tar",
-               command = ["make", WithProperties("-j%(jobs)d", jobs=GetNumJobs), "tools/tar/install", "V=s"],
+               command = ["make", WithProperties("-j%(jobs)d", jobs=GetNumJobs), "tools/tar/compile", "V=s"],
                env = MakeEnv(),
                haltOnFailure = True
        ))
@@ -756,7 +762,7 @@ for target in targets:
 
        from buildbot.config import BuilderConfig
 
-       c['builders'].append(BuilderConfig(name=target, slavenames=slaveNames, factory=factory))
+       c['builders'].append(BuilderConfig(name=target, slavenames=slaveNames, factory=factory, nextBuild=GetNextBuild))
 
 
 ####### STATUS TARGETS