diff options
author | Raul Cuza <raulcuza@gmail.com> | 2011-07-01 17:13:09 -0400 |
---|---|---|
committer | Raul Cuza <raulcuza@gmail.com> | 2011-07-01 17:13:09 -0400 |
commit | 4ff124d7c9179c5286cf41256883a94ba2e07f7e (patch) | |
tree | 092b9e185efea3d5d3a1091a047f902aa2abaebd | |
parent | b840cd4f247094ffe1233e213a4323ff7237f441 (diff) | |
download | bcfg2-4ff124d7c9179c5286cf41256883a94ba2e07f7e.tar.gz bcfg2-4ff124d7c9179c5286cf41256883a94ba2e07f7e.tar.bz2 bcfg2-4ff124d7c9179c5286cf41256883a94ba2e07f7e.zip |
Add new version variables to export script
-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) |