From 6f408ec810227f9c371bb063105a8b8511250e28 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 May 2013 17:08:39 +0530 Subject: [PATCH] Move tagging to use git --- setup/publish.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/setup/publish.py b/setup/publish.py index fd0dd48900..441ca5548c 100644 --- a/setup/publish.py +++ b/setup/publish.py @@ -27,20 +27,20 @@ class Stage1(Command): class Stage2(Command): - description = 'Stage 2 of the publish process' - sub_commands = ['linux', 'win', 'osx'] + description = 'Stage 2 of the publish process' + sub_commands = ['linux', 'win', 'osx'] - def pre_sub_commands(self, opts): - for x in glob.glob(os.path.join(self.d(self.SRC), 'dist', '*')): - os.remove(x) - build = os.path.join(self.d(self.SRC), 'build') - if os.path.exists(build): - shutil.rmtree(build) + def pre_sub_commands(self, opts): + for x in glob.glob(os.path.join(self.d(self.SRC), 'dist', '*')): + os.remove(x) + build = os.path.join(self.d(self.SRC), 'build') + if os.path.exists(build): + shutil.rmtree(build) class Stage3(Command): - description = 'Stage 3 of the publish process' - sub_commands = ['upload_user_manual', 'upload_demo', 'sdist', 'tag_release'] + description = 'Stage 3 of the publish process' + sub_commands = ['upload_user_manual', 'upload_demo', 'sdist', 'tag_release'] class Stage4(Command): @@ -105,11 +105,10 @@ class Manual(Command): class TagRelease(Command): - description = 'Tag a new release in bzr' + description = 'Tag a new release in git' def run(self, opts): self.info('Tagging release') - subprocess.check_call(('bzr tag '+__version__).split()) - subprocess.check_call('bzr commit --unchanged -m'.split() + ['IGN:Tag release']) - + subprocess.check_call('git tag -a {0} -m "version-{0}"'.format(__version__).split()) + subprocess.check_call('git push origin {0}'.format(__version__).split())