如何从我的sbt自动增加版本号并上传到git [英] How to automatically increment version number from my sbt and uploaded to git
问题描述
如何从 build.sbt
文件中增加项目版本号,以便在编译时自动将其上传到git?
How do I can increment project version number from my build.sbt
file so that when you compile it automatically uploads to git?
推荐答案
sbt-release
插件将为您完成所有这些工作.
The sbt-release
plugin will do all of this for you.
如果您从命令行发出命令 sbt release
,则此插件将删除 -SNAPSHOT
后缀,标记,提交并将更改推送到存储库,然后进行构建,测试并发布工件,然后更新版本版本号(再次添加 -SNAPSHOT
后缀),再次提交更改.
If you issue the command sbt release
from the command line, this plugin will remove the -SNAPSHOT
suffix, tag, commit and push the changes to your repository, build, test and release the artifact, then update the version version number (adding the -SNAPSHOT
suffix back again), committing the changes once more.
可以根据需要自定义以上所有步骤.
All of the above steps can be customized if necessary.
这篇关于如何从我的sbt自动增加版本号并上传到git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!