如何从我的 sbt 自动增加版本号并上传到 git [英] How to automatically increment version number from my sbt and uploaded to git

查看:18
本文介绍了如何从我的 sbt 自动增加版本号并上传到 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆