summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-07-25 21:20:36 (GMT)
committerColin Walters <walters@verbum.org>2011-07-27 13:12:16 (GMT)
commitb3968c6d7caeaf8ab324fc8e94424a4cbd1c9a85 (patch)
treec62fb79bd895fed3c26d7906fb892baba4a539d7 /tools
parent349fc37b29c2e2c9d15c6c53c88f4dd108a94945 (diff)
downloadgobject-introspection-b3968c6d7caeaf8ab324fc8e94424a4cbd1c9a85.tar.gz
gobject-introspection-b3968c6d7caeaf8ab324fc8e94424a4cbd1c9a85.tar.xz
build: rework prepare-minor-release bits to handle srcdir != builddir
Diffstat (limited to 'tools')
-rw-r--r--tools/verbump.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/verbump.py b/tools/verbump.py
index 4e38372..0c7d593 100644
--- a/tools/verbump.py
+++ b/tools/verbump.py
@@ -25,8 +25,9 @@ if not os.path.isfile('config.log'):
package = _extract_config_log_variable('PACKAGE_TARNAME')
version = _extract_config_log_variable('VERSION')
-f = open('configure.ac');
-newf = open('configure.ac.new', 'w')
+configure_path=os.path.join(os.environ['top_srcdir'], 'configure.ac')
+f = open(configure_path)
+newf = open(configure_path + '.tmp', 'w')
for line in f:
m = micro_version_re.match(line)
if not m:
@@ -38,9 +39,9 @@ for line in f:
newf.write(micro_version_replace % (newv, ))
newf.close()
-os.rename('configure.ac.new', 'configure.ac')
+os.rename(configure_path + '.tmp', configure_path)
print "Successfully wrote new 'configure.ac' with post-release version bump"
-args=['git', 'commit', '-m', "configure: Post-release version bump", 'configure.ac']
+args=['git', 'commit', '-m', "configure: Post-release version bump", configure_path]
print "Running: %r" % (args, )
subprocess.check_call(args)