Commit 6be44275 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

modified createProjVersHeader.py to handle special cases

parent 3e71ee96
package GaudiPolicy
package manager: Marco Clemencic
! 2014-06-19 - Marco Clemencic
- Modified createProjVersHeader.py to handle more nicely special cases like the
ATLAS "rel_1".
! 2014-06-10 - Charles Leggett
- cmt: print warning message if client uses generate_rootmap pattern
M cmt/requirements
......
......@@ -21,17 +21,18 @@ def main():
project, version, outputfile = args
if not opts.quiet:
print "Creating %s for %s %s" % (outputfile, project, version)
if version.startswith('HEAD'):
majver, minver, patver = 999, 999, 0 # special handling
for style in [lhcb_ver_style, atlas_ver_style, plain_ver_style ] :
m = re.match(style, version)
if m :
majver = int(m.groupdict()['maj_ver'])
minver = int(m.groupdict()['min_ver'])
patver = int(m.groupdict()['pat_ver'] or 0)
break
else:
for style in [lhcb_ver_style, atlas_ver_style, plain_ver_style ] :
m = re.match(style, version)
if m :
break
majver = int(m.groupdict()['maj_ver'])
minver = int(m.groupdict()['min_ver'])
patver = int(m.groupdict()['pat_ver'] or 0)
# anything that is not one of the explicit version syntaxes is handled
# in the same way, e.g. "HEAD"
majver, minver, patver = 999, 999, 0
outdir = os.path.dirname(outputfile)
if not os.path.exists(outdir):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment