diff options
-rw-r--r-- | osx/Makefile | 2 | ||||
-rwxr-xr-x | tools/export.py | 25 |
2 files changed, 15 insertions, 12 deletions
diff --git a/osx/Makefile b/osx/Makefile index 4bca85582..de2d75402 100644 --- a/osx/Makefile +++ b/osx/Makefile @@ -31,7 +31,7 @@ SITELIBDIR = /Library/Python/${PYVERSION}/site-packages # integers (e.g. "1" and "00" for bcfg2 version 1.0.0. BCFGVER = 1.2.0pre3 MAJOR = 1 -MINOR = 2.0 +MINOR = 20 default: clean client diff --git a/tools/export.py b/tools/export.py index fa75686b6..b1c4d0ecb 100755 --- a/tools/export.py +++ b/tools/export.py @@ -97,24 +97,27 @@ def main(argv=None): vkeys = ["major", "minor", "microbuild"] try: version_info = dict(zip(vkeys,version.split("."))) - if not version_info["major"].isdigit() or not version_info["minor"].isdigit(): + version_info["micro"] = version_info["microbuild"][0:1] + version_info["build"] = version_info["microbuild"][1:] + version_release = "%s.%s.%s" % (version_info['major'], version_info['minor'], version_info['micro']) + + if options.debug: + print "version is %s" % version + print "version_info is %s" % version_info + print "version_release is %s" % version_release + + if not version_info["major"].isdigit() or not version_info["minor"].isdigit() or not version_info["micro"]: raise VersionError('isdigit() test failed') + if version_info["micro"] > 1: + raise VersionError('micro must be single digit because IFMinorVersion restrictions in Mac OS X Packaging') except: print """Version must be of the form Major.Minor.MicroBuild, where Major and Minor are integers and Micro is a single digit optionally followed by Build (i.e. pre##) E.G. 1.2.0pre1 is a valid version. - """ +""" quit() - version_info["micro"] = version_info["microbuild"][0:1] - version_info["build"] = version_info["microbuild"][1:] - version_release = "%s.%s.%s" % (version_info['major'], version_info['minor'], version_info['micro']) - - if options.debug: - print "version is %s" % version - print "version_info is %s" % version_info - print "version_release is %s" % version_release tarname = '/tmp/%s-%s.tar.gz' % (pkgname, version) @@ -199,7 +202,7 @@ E.G. 1.2.0pre1 is a valid version. startswith=True, dryrun=options.dryrun) find_and_replace('osx/Makefile', 'MINOR =', - 'MINOR = %s.%s\n' % (version_info['minor'], version_info['micro']), + 'MINOR = %s%s\n' % (version_info['minor'], version_info['micro']), startswith=True, dryrun=options.dryrun) |