1 Star 0 Fork 0

chaoz / jenkins

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
show-pom-version.rb 320 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/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
1
https://gitee.com/lhc0101/jenkins.git
git@gitee.com:lhc0101/jenkins.git
lhc0101
jenkins
jenkins
master

搜索帮助