phase1: allow tag versions with rc designations
authorJo-Philipp Wich <jo@mein.io>
Sat, 28 Jan 2017 13:01:50 +0000 (14:01 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sat, 28 Jan 2017 13:01:50 +0000 (14:01 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
phase1/master.cfg

index 542c3c546f287d2e0898f89b1d779e8eda6049f1..abb5501d455a1f737641075adca1fbe29438d66a 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