2015-09-12 15:39:36 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2016-09-10 18:56:24 +02:00
|
|
|
print("This script uses buildno.h, which is deprecated\nExiting.\n")
|
|
|
|
sys.exit(1)
|
|
|
|
|
2015-09-12 15:39:36 +02:00
|
|
|
template="""#define VERSION_MAJOR %s
|
|
|
|
#define VERSION_MINOR %s
|
|
|
|
#define VERSION_BUILD %s
|
|
|
|
"""
|
|
|
|
|
|
|
|
def new_version(ver):
|
|
|
|
sp = ver.split(".")
|
|
|
|
sp = (sp[0], sp[1], sp[2])
|
|
|
|
file = open("src/buildno.h", "w")
|
|
|
|
file.write(template % sp)
|
|
|
|
file.close()
|
|
|
|
os.system("git add src/buildno.h")
|
|
|
|
os.system("git commit -m 'release version %s'" % ver)
|
2015-09-12 15:42:03 +02:00
|
|
|
os.system("git tag -f v%s" % ver)
|
2015-09-12 15:39:36 +02:00
|
|
|
|
|
|
|
new_version(sys.argv[1])
|