Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpgritti@gmail.com>2008-10-25 23:15:20 (GMT)
committer Marco Pesenti Gritti <mpgritti@gmail.com>2008-10-25 23:15:20 (GMT)
commit9c74f4eec71559c9e1c30c086590ef51f4320bcd (patch)
tree27d689b12496459f574cc2497f9c22f73af17f63 /src
parent9ab32f3b77294b1b6a1ca6759f0943009266cb3b (diff)
Drop broken release command. A more generic release tools
is being developed in sugar-tools now.
Diffstat (limited to 'src')
-rw-r--r--src/sugar/activity/bundlebuilder.py104
1 files changed, 0 insertions, 104 deletions
diff --git a/src/sugar/activity/bundlebuilder.py b/src/sugar/activity/bundlebuilder.py
index baeb8b6..ce8787a 100644
--- a/src/sugar/activity/bundlebuilder.py
+++ b/src/sugar/activity/bundlebuilder.py
@@ -355,110 +355,6 @@ def cmd_genpot(config, args):
if retcode:
print 'ERROR - xgettext failed with return code %i.' % retcode
-def cmd_release(config, args):
- '''Do a new release of the bundle'''
-
- if args:
- print 'Usage: %prog release'
- return
-
- if not os.path.isdir('.git'):
- print 'ERROR - this command works only for git repositories'
- return
-
- retcode = subprocess.call(['git', 'pull'])
- if retcode:
- print 'ERROR - cannot pull from git'
- return
-
- print 'Bumping activity version...'
-
- info_path = os.path.join(config.source_dir, 'activity', 'activity.info')
- f = open(info_path,'r')
- info = f.read()
- f.close()
-
- exp = re.compile('activity_version\s?=\s?([0-9]*)')
- match = re.search(exp, info)
- version = int(match.group(1)) + 1
- info = re.sub(exp, 'activity_version = %d' % version, info)
-
- f = open(info_path, 'w')
- f.write(info)
- f.close()
-
- config.update()
-
- news_path = os.path.join(config.source_dir, 'NEWS')
-
- if os.environ.has_key('SUGAR_NEWS'):
- print 'Update NEWS.sugar...'
-
- sugar_news_path = os.environ['SUGAR_NEWS']
- if os.path.isfile(sugar_news_path):
- f = open(sugar_news_path,'r')
- sugar_news = f.read()
- f.close()
- else:
- sugar_news = ''
-
- sugar_news += '%s - %d\n\n' % (config.bundle_name, version)
-
- f = open(news_path,'r')
- for line in f.readlines():
- if len(line.strip()) > 0:
- sugar_news += line
- else:
- break
- f.close()
-
- sugar_news += '\n'
-
- f = open(sugar_news_path, 'w')
- f.write(sugar_news)
- f.close()
-
- print 'Update NEWS...'
-
- f = open(news_path,'r')
- news = f.read()
- f.close()
-
- news = '%d\n\n' % version + news
-
- f = open(news_path, 'w')
- f.write(news)
- f.close()
-
- print 'Creating the bundle...'
- packager = XOPackager(Builder(config))
- packager.package()
-
- print 'Committing to git...'
-
- changelog = 'Release version %d.' % version
- retcode = subprocess.call(['git', 'commit', '-a', '-m % s' % changelog])
- if retcode:
- print 'ERROR - cannot commit to git'
- return
-
- retcode = subprocess.call(['git', 'tag', 'v%s' % version])
- if retcode:
- print 'ERROR - cannot tag the commit'
- return
-
- retcode = subprocess.call(['git', 'push'])
- if retcode:
- print 'ERROR - cannot push to git'
- return
-
- retcode = subprocess.call(['git', 'push', '--tags'])
- if retcode:
- print 'ERROR - cannot push tags to git'
- return
-
- print 'Done.'
-
def cmd_build(config, args):
'''Build generated files'''