From 535d9835e2be6a8dbcca7ad83068495398e01070 Mon Sep 17 00:00:00 2001 From: Benjamin Saller Date: Tue, 17 Jul 2007 00:03:15 +0000 Subject: Merge branch 'master' of git+ssh://dev.laptop.org/git/projects/datastore --- diff --git a/NEWS b/NEWS index 4215656..1cf00b2 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +Snapshot 2978ff86bd + +* Allow activities to specify custom metadata properties. (bcsaller) * Fix the problems with content indexing end reenable it. (bcsaller) Snapshot 18b7951026 diff --git a/maint-helper.py b/maint-helper.py index 45be31f..8c64ca2 100755 --- a/maint-helper.py +++ b/maint-helper.py @@ -20,6 +20,7 @@ import os import sys import re import datetime +import subprocess source_exts = [ '.py', '.c', '.h', '.cpp' ] @@ -50,15 +51,74 @@ maint-helper.py check-licenses - check licenses in the source' def cmd_build_snapshot(): [ name, version ] = get_name_and_version() + print 'Update git...' + + retcode = subprocess.call(['git', 'pull']) + if retcode: + print 'ERROR - cannot pull from git' + cmd = 'git-show-ref --hash=10 refs/heads/master' alphatag = os.popen(cmd).readline().strip() tarball = '%s-%s-git%s.tar.bz2' % (name, version, alphatag) + print 'Build %s...' % tarball + os.spawnlp(os.P_WAIT, 'make', 'make', 'distcheck') os.rename('%s-%s.tar.bz2' % (name, version), tarball) + print 'Update NEWS.sugar...' + + if os.environ.has_key('SUGAR_NEWS'): + 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 = '' + + [ name, version ] = get_name_and_version() + sugar_news += '%s - %s - %s\n\n' % (name, version, alphatag) + + f = open('NEWS', 'r') + for line in f.readlines(): + if len(line.strip()) > 0: + sugar_news += line + else: + break + f.close() + + f = open(sugar_news_path, 'w') + f.write(sugar_news) + f.close() + + print 'Update NEWS...' + + f = open('NEWS', 'r') + news = f.read() + f.close() + + news = 'Snapshot %s\n\n' % alphatag + news + + f = open('NEWS', 'w') + f.write(news) + f.close() + + print 'Committing to git...' + + changelog = 'Snapshot %s.' % alphatag + retcode = subprocess.call(['git', 'commit', '-a', '-m % s' % changelog]) + if retcode: + print 'ERROR - cannot commit to git' + + retcode = subprocess.call(['git', 'push']) + if retcode: + print 'ERROR - cannot push to git' + + print 'Done.' + def check_licenses(path, license, missing): matchers = { 'LGPL' : 'GNU Lesser General Public', 'GPL' : 'GNU General Public License' } -- cgit v0.9.1