From 882a5f2c29b58d153d1e5219841366c6185d8812 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 17 Jul 2007 22:28:40 +0200 Subject: [PATCH] setup.py release does a git pull before releasing. --- sugar/activity/bundlebuilder.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sugar/activity/bundlebuilder.py b/sugar/activity/bundlebuilder.py index 471e0c19..6712146d 100644 --- a/sugar/activity/bundlebuilder.py +++ b/sugar/activity/bundlebuilder.py @@ -234,6 +234,10 @@ def cmd_release(bundle_name, manifest): if not os.path.isdir('.git'): print 'ERROR - this command works only for git repositories' + retcode = subprocess.call(['git', 'pull']) + if retcode: + print 'ERROR - cannot pull from git' + print 'Bumping activity version...' info_path = os.path.join(_get_source_path(), 'activity', 'activity.info') @@ -310,9 +314,8 @@ def cmd_release(bundle_name, manifest): repo = os.environ['ACTIVITIES_REPOSITORY'] server, path = repo.split(':') - retcode = subprocess.call(['ssh', server, 'mv', - '%s/%s*' % (path, bundle_name), - '%s/old' % path]) + retcode = subprocess.call(['ssh', server, 'rm', + '%s/%s*' % (path, bundle_name)]) if retcode: print 'ERROR - cannot remove old bundles from the repository.'