diff options
author | Colin Walters <walters@verbum.org> | 2011-07-25 17:20:36 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-07-27 09:12:16 -0400 |
commit | b3968c6d7caeaf8ab324fc8e94424a4cbd1c9a85 (patch) | |
tree | c62fb79bd895fed3c26d7906fb892baba4a539d7 /tools/verbump.py | |
parent | 349fc37b29c2e2c9d15c6c53c88f4dd108a94945 (diff) | |
download | gobject-introspection-b3968c6d7caeaf8ab324fc8e94424a4cbd1c9a85.tar.gz |
build: rework prepare-minor-release bits to handle srcdir != builddir
Diffstat (limited to 'tools/verbump.py')
-rw-r--r-- | tools/verbump.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/verbump.py b/tools/verbump.py index 4e383729..0c7d593f 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) |