Add a script for updating automatically the plugin version
This commit is contained in:
parent
5e02eb0e95
commit
809955d0b6
2 changed files with 32 additions and 1 deletions
25
utils/umc_dev/build/update_version
Normal file
25
utils/umc_dev/build/update_version
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python
|
||||
import os, sys, shutil
|
||||
base_path = os.path.dirname(os.path.realpath(__file__))
|
||||
usage = "usage: update_version current_version new_version \ne.g.: update_version 2.0.0 2.0.1"
|
||||
files = ["org.wesnoth.dependencies.feature/feature.xml", "org.wesnoth.feature/category.xml", "org.wesnoth.feature/feature.xml",
|
||||
"org.wesnoth.ui/META-INF/MANIFEST.MF","org.wesnoth/META-INF/MANIFEST.MF", "org.wesnoth/org.wesnoth.product"]
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print usage
|
||||
else:
|
||||
print "Replacing version ", sys.argv[1], " with ", sys.argv[2], "..."
|
||||
stext = sys.argv[1] + ".qualifier"
|
||||
rtext = sys.argv[2] + ".qualifier"
|
||||
for file in files:
|
||||
sourcePath = os.path.join(os.path.join(base_path, ".."), file)
|
||||
targetPath = os.path.join(os.path.join(base_path, ".."), file + ".tmp")
|
||||
|
||||
print "Processing: ", sourcePath
|
||||
input = open(sourcePath)
|
||||
output = open(targetPath, "w")
|
||||
for s in input.xreadlines():
|
||||
output.write(s.replace(stext, rtext))
|
||||
input.close()
|
||||
output.close()
|
||||
shutil.move (targetPath, sourcePath)
|
|
@ -2,7 +2,13 @@ A build script should follow the following steps:
|
|||
|
||||
1) Comment the Test handler/button in plugin.xml
|
||||
2) Build the plugin
|
||||
3) Update the version string
|
||||
3) Update the version string (you can run the "update_version" python script) in:
|
||||
- org.wesnoth.dependencies.feature/feature.xml
|
||||
- org.wesnoth.feature/category.xml
|
||||
- org.wesnoth.feature/feature.xml
|
||||
- org.wesnoth.ui/META-INF/MANIFEST.MF
|
||||
- org.wesnoth/META-INF/MANIFEST.MF
|
||||
- org.wesnoth/org.wesnoth.product
|
||||
4) Uncomment the test Handler/button in plugin.xml
|
||||
5) Upload files to sf.net
|
||||
6) Update the html files with news about the new version
|
||||
|
|
Loading…
Add table
Reference in a new issue