another script to print the version string from POM
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16491 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
parent
d0b1e4b384
commit
70cebd33af
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/ruby
|
||||
# parse POM from stdin and prints the version number
|
||||
require "rexml/document"
|
||||
require "rexml/xpath"
|
||||
|
||||
pom = REXML::Document.new $stdin
|
||||
# if the POM doesn't define the version by itself, it's inherited from the parent
|
||||
puts (pom.elements["/project/version"] || pom.elements["/project/parent/version"]).text
|
Loading…
Reference in New Issue