added script to update all files with a libtorrent version number in them
This commit is contained in:
@@ -205,7 +205,7 @@ set_target_properties(torrent-rasterbar PROPERTIES
|
|||||||
SOVERSION 1
|
SOVERSION 1
|
||||||
VERSION 1)
|
VERSION 1)
|
||||||
|
|
||||||
set (VERSION "0.15-svn")
|
set (VERSION "0.15.0")
|
||||||
|
|
||||||
get_property (COMPILETIME_OPTIONS_LIST
|
get_property (COMPILETIME_OPTIONS_LIST
|
||||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIRECTORY}
|
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIRECTORY}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
AC_PREREQ(2.60)
|
AC_PREREQ(2.60)
|
||||||
|
|
||||||
AC_INIT([libtorrent-rasterbar], [0.15], [arvid@rasterbar.com])
|
AC_INIT([libtorrent-rasterbar], [0.15.0], [arvid@cs.umu.se])
|
||||||
AM_INIT_AUTOMAKE(foreign 1.10)
|
AM_INIT_AUTOMAKE(foreign 1.10)
|
||||||
AC_CONFIG_SRCDIR([src/torrent.cpp])
|
AC_CONFIG_SRCDIR([src/torrent.cpp])
|
||||||
|
|
||||||
|
@@ -3,6 +3,7 @@ libtorrent manual
|
|||||||
=================
|
=================
|
||||||
|
|
||||||
:Author: Arvid Norberg, arvid@rasterbar.com
|
:Author: Arvid Norberg, arvid@rasterbar.com
|
||||||
|
:Version: 0.15.0
|
||||||
|
|
||||||
.. contents:: Table of contents
|
.. contents:: Table of contents
|
||||||
:depth: 2
|
:depth: 2
|
||||||
|
@@ -3,6 +3,7 @@ libtorrent manual
|
|||||||
=================
|
=================
|
||||||
|
|
||||||
:Author: Arvid Norberg, arvid@rasterbar.com
|
:Author: Arvid Norberg, arvid@rasterbar.com
|
||||||
|
:Version: 0.15.0
|
||||||
|
|
||||||
.. contents:: Table of contents
|
.. contents:: Table of contents
|
||||||
:depth: 2
|
:depth: 2
|
||||||
|
@@ -3,7 +3,7 @@ libtorrent API Documentation
|
|||||||
============================
|
============================
|
||||||
|
|
||||||
:Author: Arvid Norberg, arvid@rasterbar.com
|
:Author: Arvid Norberg, arvid@rasterbar.com
|
||||||
:Version: 0.15
|
:Version: 0.15.0
|
||||||
|
|
||||||
.. contents:: Table of contents
|
.. contents:: Table of contents
|
||||||
:depth: 2
|
:depth: 2
|
||||||
|
35
set_version.py
Normal file
35
set_version.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
version = (int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3]), int(sys.argv[4]))
|
||||||
|
|
||||||
|
def substitute_file(name):
|
||||||
|
subst = ''
|
||||||
|
f = open(name)
|
||||||
|
for l in f:
|
||||||
|
if '#define LIBTORRENT_VERSION_MAJOR' in l:
|
||||||
|
l = '#define LIBTORRENT_VERSION_MAJOR %d\n' % version[0]
|
||||||
|
elif '#define LIBTORRENT_VERSION_MINOR' in l:
|
||||||
|
l = '#define LIBTORRENT_VERSION_MINOR %d\n' % version[1]
|
||||||
|
elif '#define LIBTORRENT_VERSION' in l:
|
||||||
|
l = '#define LIBTORRENT_VERSION "%d.%d.%d.%d"\n' % (version[0], version[1], version[2], version[3])
|
||||||
|
elif 'AC_INIT([libtorrent-rasterbar]' in l:
|
||||||
|
l = 'AC_INIT([libtorrent-rasterbar], [%d.%d.%d], [arvid@cs.umu.se])\n' % (version[0], version[1], version[2])
|
||||||
|
elif 'set (VERSION ' in l:
|
||||||
|
l = 'set (VERSION "%d.%d.%d")\n' % (version[0], version[1], version[2])
|
||||||
|
elif ':Version: ' in l:
|
||||||
|
l = ':Version: %d.%d.%d\n' % (version[0], version[1], version[2])
|
||||||
|
|
||||||
|
subst += l
|
||||||
|
|
||||||
|
f.close()
|
||||||
|
open(name, 'w+').write(subst)
|
||||||
|
|
||||||
|
|
||||||
|
substitute_file('include/libtorrent/version.hpp')
|
||||||
|
substitute_file('CMakeLists.txt')
|
||||||
|
substitute_file('configure.in')
|
||||||
|
substitute_file('docs/manual.rst')
|
||||||
|
substitute_file('docs/building.rst')
|
||||||
|
substitute_file('docs/features.rst')
|
||||||
|
|
Reference in New Issue
Block a user