mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
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:
1 parent
d0b1e4b384
commit
70cebd33af
1 file changed
+8
Executable
+8
@@ -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
|
||||
Reference in new issue
Block a user