summaryrefslogtreecommitdiff
path: root/buildscripts/packager.py
diff options
context:
space:
mode:
authorErnie Hershey <ernie.hershey@10gen.com>2015-12-07 07:36:43 -0500
committerSam Kleinman <samk@10gen.com>2015-12-08 10:54:01 -0500
commit676a6ade885b0950a52538e64033611dcd640b4d (patch)
treec46002dcf6673d2adf09612dce6a963fe32ee1de /buildscripts/packager.py
parentfbb8433c210c2a028fad3524ad6c87817ccff0d8 (diff)
downloadmongo-676a6ade885b0950a52538e64033611dcd640b4d.tar.gz
SERVER-21781 Improve packaging nightly logic
Diffstat (limited to 'buildscripts/packager.py')
-rwxr-xr-xbuildscripts/packager.py8
1 files changed, 5 insertions, 3 deletions
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)