diff options
author | Raul Cuza <raulcuza@gmail.com> | 2011-07-01 17:13:09 -0400 |
---|---|---|
committer | Raul Cuza <raulcuza@gmail.com> | 2011-07-06 13:37:59 -0400 |
commit | 5aa97a1b01f0a4508d4e5adbe0db5022029bead8 (patch) | |
tree | 72a34309b76ba69d51884d1d2653c0dc59182c34 /tools | |
parent | 0b24ff7603b4f8d2b00de8438559b131fa6d1ca4 (diff) | |
download | bcfg2-5aa97a1b01f0a4508d4e5adbe0db5022029bead8.tar.gz bcfg2-5aa97a1b01f0a4508d4e5adbe0db5022029bead8.tar.bz2 bcfg2-5aa97a1b01f0a4508d4e5adbe0db5022029bead8.zip |
Add new version variables to export script
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/export2.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/export2.py b/tools/export2.py index 9fa920d18..bb7ad23ca 100755 --- a/tools/export2.py +++ b/tools/export2.py @@ -45,6 +45,17 @@ if __name__ == '__main__': name = input("Your name: ") email = input("Your email: ") + # parse version into Major.Minor.Build and validate + try: + [version_major, version_minor, version_build] = version.split(".") + if not version_major.isdigit() or not version_minor.isdigit(): + raise VersionError('isdigit() test failed') + except: + print "Version must be of the form Major.Minor.Build, where Major and Minor are integers and Build is a single digit optionally followed by pre##" + quit() + + version_macbuild = version_build[0:1] + tarname = '/tmp/%s-%s.tar.gz' % (pkgname, version) # update the version @@ -98,14 +109,14 @@ if __name__ == '__main__': # tag the release #FIXME: do this using python-dulwich - cmd = "git commit -asm 'Version bump to %s'" % version + cmd = "ggit commit -asm 'Version bump to %s'" % version output = run(cmd)[0].strip() # NOTE: This will use the default email address key. If you want to sign the tag # using a different key, you will need to set 'signingkey' to the proper # value in the [user] section of your git configuration. - cmd = "git tag -s v%s -m 'tagged %s release'" % (version, version) + cmd = "ggit tag -s v%s -m 'tagged %s release'" % (version, version) output = run(cmd)[0].strip() - cmd = "git archive --format=tar --prefix=%s-%s/ v%s | gzip > %s" % \ + cmd = "ggit archive --format=tar --prefix=%s-%s/ v%s | gzip > %s" % \ (pkgname, version, version, tarname) output = run(cmd)[0].strip() cmd = "gpg --armor --output %s.gpg --detach-sig %s" % (tarname, tarname) |