aboutsummaryrefslogtreecommitdiffstats
path: root/release.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-10-21 08:15:42 -0400
committerW. Trevor King <wking@drexel.edu>2010-10-21 08:15:42 -0400
commit8779fc64deda18b6973da3eef57aaca680709991 (patch)
tree6dc300daa6b5fc30d68675363d1b1287a3ea7985 /release.py
parente4bfbcca9a0a5a6985f72acc812698e89a9b3efe (diff)
downloadbugseverywhere-8779fc64deda18b6973da3eef57aaca680709991.tar.gz
release.set_vcs_name() now adjusts any vcs settings in the exported .be/.
Also call remove_makefile_libbe_version_dependencies() on the exported Makefile.
Diffstat (limited to 'release.py')
-rwxr-xr-xrelease.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/release.py b/release.py
index f435701..6481152 100755
--- a/release.py
+++ b/release.py
@@ -69,10 +69,10 @@ def set_release_version(tag):
invoke(['sed', '-i', "s/^# *_VERSION *=.*/_VERSION = '%s'/" % tag,
os.path.join('libbe', 'version.py')])
-def remove_makefile_libbe_version_dependencies():
- print "set Makefile LIBBE_VERSION :="
+def remove_makefile_libbe_version_dependencies(filename):
+ print "set %s LIBBE_VERSION :=" % filename
invoke(['sed', '-i', "s/^LIBBE_VERSION *:=.*/LIBBE_VERSION :=/",
- 'Makefile'])
+ filename])
def commit(commit_message):
print 'commit current status:', commit_message
@@ -105,25 +105,32 @@ def make_changelog(filename, tag):
'%s..%s' % (INITIAL_COMMIT, tag)],
stdout=open(filename, 'w')),
-def set_vcs_name(filename, vcs_name='None'):
+def set_vcs_name(be_dir, vcs_name='None'):
"""Exported directory is not a git repository, so set vcs_name to
something that will work.
vcs_name: new_vcs_name
"""
- print 'set vcs_name in', filename, 'to', vcs_name
- invoke(['sed', '-i', "s/^vcs_name:.*/vcs_name: %s/" % vcs_name,
- filename])
+ for directory in os.listdir(be_dir):
+ if not os.path.isdir(os.path.join(be_dir, directory)):
+ continue
+ filename = os.path.join(be_dir, directory, 'settings')
+ if os.path.exists(filename):
+ print 'set vcs_name in', filename, 'to', vcs_name
+ invoke(['sed', '-i', "s/^vcs_name:.*/vcs_name: %s/" % vcs_name,
+ filename])
def create_tarball(tag):
release_name='be-%s' % tag
export_dir = release_name
export(export_dir)
make_version()
+ remove_makefile_libbe_version_dependencies(
+ os.path.join(export_dir, 'Makefile'))
print 'copy libbe/_version.py to %s/libbe/_version.py' % export_dir
shutil.copy(os.path.join('libbe', '_version.py'),
os.path.join(export_dir, 'libbe', '_version.py'))
make_changelog(os.path.join(export_dir, 'ChangeLog'), tag)
- set_vcs_name(os.path.join(export_dir, '.be', 'settings'))
+ set_vcs_name(os.path.join(export_dir, '.be'))
tarball_file = '%s.tar.gz' % release_name
print 'create tarball', tarball_file
invoke(['tar', '-czf', tarball_file, export_dir])