diff --git a/set_version.py b/set_version.py index 4394e9211..78a396e13 100644 --- a/set_version.py +++ b/set_version.py @@ -7,21 +7,21 @@ def substitute_file(name): subst = '' f = open(name) for l in f: - if '#define LIBTORRENT_VERSION_MAJOR' in l and filename.endiswith('.hpp'): + if '#define LIBTORRENT_VERSION_MAJOR' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_MAJOR %d\n' % version[0] - elif '#define LIBTORRENT_VERSION_MINOR' in l and filename.endiswith('.hpp'): + elif '#define LIBTORRENT_VERSION_MINOR' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_MINOR %d\n' % version[1] - if '#define LIBTORRENT_VERSION_TINY' in l and filename.endiswith('.hpp'): + if '#define LIBTORRENT_VERSION_TINY' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION_TINY %d\n' % version[2] - elif '#define LIBTORRENT_VERSION' in l and filename.endiswith('.hpp'): + elif '#define LIBTORRENT_VERSION' in l and name.endswith('.hpp'): l = '#define LIBTORRENT_VERSION "%d.%d.%d.%d"\n' % (version[0], version[1], version[2], version[3]) - elif 'AC_INIT([libtorrent-rasterbar]' in l and filename.endiswith('.in'): + elif 'AC_INIT([libtorrent-rasterbar]' in l and name.endswith('.in'): l = 'AC_INIT([libtorrent-rasterbar], [%d.%d.%d], [arvid@cs.umu.se])\n' % (version[0], version[1], version[2]) - elif 'set (VERSION ' in l and filename.endiswith('.in'): + elif 'set (VERSION ' in l and name.endswith('.in'): l = 'set (VERSION "%d.%d.%d")\n' % (version[0], version[1], version[2]) - elif ':Version: ' in l and filename.endiswith('.rst'): + elif ':Version: ' in l and name.endswith('.rst'): l = ':Version: %d.%d.%d\n' % (version[0], version[1], version[2]) - elif 'VERSION = ' in l and filename.endiswith('Jamfile'): + elif 'VERSION = ' in l and name.endswith('Jamfile'): l = 'VERSION = %d.%d.%d ;\n' % (version[0], version[1], version[2]) subst += l @@ -36,4 +36,6 @@ substitute_file('configure.in') substitute_file('docs/manual.rst') substitute_file('docs/building.rst') substitute_file('docs/features.rst') +substitute_file('Jamfile') +