Created
November 10, 2017 10:48
-
-
Save dizzythinks/f3bb37fd8ab1484bfec79d39ad8a92d3 to your computer and use it in GitHub Desktop.
Revisions
-
dizzythinks created this gist
Nov 10, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ def managePom(update=False): from xml.etree import ElementTree as et ns = "http://maven.apache.org/POM/4.0.0" et.register_namespace('', ns) tree = et.ElementTree() tree.parse('pom.xml') p = tree.getroot().find("{%s}version" % ns) if update: p.text = update tree.write('pom.xml') else: return p.text