mirror of https://github.com/AxioDL/tinyxml2.git
improving setversion.py
This commit is contained in:
parent
c18eb23326
commit
5938e6f8a4
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import optparse
|
||||||
|
|
||||||
def fileProcess( name, lineFunction ):
|
def fileProcess( name, lineFunction ):
|
||||||
filestream = open( name, 'r' )
|
filestream = open( name, 'r' )
|
||||||
|
@ -29,9 +30,15 @@ def fileProcess( name, lineFunction ):
|
||||||
def echoInput( line ):
|
def echoInput( line ):
|
||||||
return line
|
return line
|
||||||
|
|
||||||
major = input( "Major: " )
|
parser = optparse.OptionParser( "usage: %prog major minor build" )
|
||||||
minor = input( "Minor: " )
|
(options, args) = parser.parse_args()
|
||||||
build = input( "Build: " )
|
if len(args) != 3:
|
||||||
|
parser.error( "incorrect number of arguments" );
|
||||||
|
|
||||||
|
major = args[0]
|
||||||
|
minor = args[1]
|
||||||
|
build = args[2]
|
||||||
|
versionStr = major + "." + minor + "." + build
|
||||||
|
|
||||||
print "Setting dox,tinyxml2.h"
|
print "Setting dox,tinyxml2.h"
|
||||||
print "Version: " + `major` + "." + `minor` + "." + `build`
|
print "Version: " + `major` + "." + `minor` + "." + `build`
|
||||||
|
@ -105,3 +112,8 @@ def cmakeRule2( line ):
|
||||||
return line;
|
return line;
|
||||||
|
|
||||||
fileProcess( "CMakeLists.txt", cmakeRule2 )
|
fileProcess( "CMakeLists.txt", cmakeRule2 )
|
||||||
|
|
||||||
|
print( "Release note:" )
|
||||||
|
print( '1. Build. Ex: g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe' )
|
||||||
|
print( '2. Commit. git commit -am"setting the version to ` + versionStr + '" )
|
||||||
|
print( '3. Tag. git tag ' + versionStr )
|
||||||
|
|
Loading…
Reference in New Issue