我有一個buildr項目,它還包含一個用於其他項目的pom.xml。 我希望能夠在增加buildfile VERSION_NUMBER =「13.3.1-SNAPSHOT」的同時增加pom.xml中的13.3.1-SNAPSHOT。在buildr發佈過程中更新pom.xml版本
VERSION_NUMBER在我的構建文件
# Auto-incremented by "release" task.
VERSION_NUMBER = "13.3.1-SNAPSHOT"
我詹金斯作業執行運行此版本的命令:
buildr clean release NEXT_VERSION=$nextVersion --trace
看buildr現場後:http://buildr.apache.org/releasing.html 看來,我可能需要做的像
Release.next_version = lambda do |next_version| # 13.3.1-SNAPSHOT
new_version = @[email protected](/\./)
new_version[0] = new_version[0] + 1
new_version
### Run task to update pom.xml <version>
### Run task commit pom.xml ???
end
Ca任何人都可以幫助我嗎? 如何在同一版本中編輯pom?
通過ruby訪問環境參數時,通常使用'ENV'常量。在你的情況下,這將是'ENV ['NEXT_VERSION']' – phoet 2013-03-13 16:59:00