diff options
-rwxr-xr-x | buildscripts/packager-enterprise.py | 4 | ||||
-rwxr-xr-x | buildscripts/packager.py | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/buildscripts/packager-enterprise.py b/buildscripts/packager-enterprise.py index f7fb0d6493a..ad0a774389b 100755 --- a/buildscripts/packager-enterprise.py +++ b/buildscripts/packager-enterprise.py @@ -54,8 +54,10 @@ class Spec(object): self.gitspec = gitspec self.rel = rel + # Nightly version numbers can be in the form: 3.0.7-pre-, or 3.0.7-5-g3b67ac + # def is_nightly(self): - return bool(re.search("-$", self.version())) + return bool(re.search("-$", self.version())) or bool(re.search("\d-\d+-g[0-9a-f]+$", self.version())) def is_rc(self): return bool(re.search("-rc\d+$", self.version())) diff --git a/buildscripts/packager.py b/buildscripts/packager.py index b0e8bee234e..d601e8e85ce 100755 --- a/buildscripts/packager.py +++ b/buildscripts/packager.py @@ -54,8 +54,10 @@ class Spec(object): self.gitspec = gitspec self.rel = rel + # Nightly version numbers can be in the form: 3.0.7-pre-, or 3.0.7-5-g3b67ac + # def is_nightly(self): - return bool(re.search("-$", self.version())) + return bool(re.search("-$", self.version())) or bool(re.search("\d-\d+-g[0-9a-f]+$", self.version())) def is_rc(self): return bool(re.search("-rc\d+$", self.version())) @@ -93,10 +95,10 @@ class Spec(object): else: corenum = 1 # RC's - if re.search("-rc\d+$", self.version()): + if self.is_rc(): return "0.%s.%s" % (corenum, re.sub('.*-','',self.version())) # Nightlies - elif re.search("-$", self.version()): + elif self.is_nightly(): return "0.%s.%s" % (corenum, time.strftime("%Y%m%d")) else: return str(corenum) |