mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-06 00:25:58 +00:00
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@16491 71c3de6d-444a-0410-be80-ed276b4c234a
9 lines
320 B
Ruby
Executable File
9 lines
320 B
Ruby
Executable File
#!/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
|