Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/leethomason/tinyxml2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Thomason <leethomason@gmail.com>2014-03-16 02:00:54 +0400
committerLee Thomason <leethomason@gmail.com>2014-03-16 02:00:54 +0400
commit5938e6f8a4ed2ac4105d558fa9a609095503d896 (patch)
tree85f87a559abf59ac3ddc4a56a7618aeb6f20f80c /setversion.py
parentc18eb233269d081c3f3b539e37eab185b678b026 (diff)
improving setversion.py
Diffstat (limited to 'setversion.py')
-rwxr-xr-xsetversion.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/setversion.py b/setversion.py
index a72ee03..11b2e75 100755
--- a/setversion.py
+++ b/setversion.py
@@ -3,6 +3,7 @@
import re
import sys
+import optparse
def fileProcess( name, lineFunction ):
filestream = open( name, 'r' )
@@ -29,9 +30,15 @@ def fileProcess( name, lineFunction ):
def echoInput( line ):
return line
-major = input( "Major: " )
-minor = input( "Minor: " )
-build = input( "Build: " )
+parser = optparse.OptionParser( "usage: %prog major minor build" )
+(options, args) = parser.parse_args()
+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 "Version: " + `major` + "." + `minor` + "." + `build`
@@ -105,3 +112,8 @@ def cmakeRule2( line ):
return line;
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 )