From 5aa97a1b01f0a4508d4e5adbe0db5022029bead8 Mon Sep 17 00:00:00 2001 From: Raul Cuza Date: Fri, 1 Jul 2011 17:13:09 -0400 Subject: Add new version variables to export script --- tools/export2.py | 17 ++++++++++++++--- 1 file 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) -- cgit v1.2.3-1-g7c22