Automatically incrementing a build number in a Java project

后端 未结 5 1210
旧巷少年郎
旧巷少年郎 2020-12-13 18:39

I\'m using a versioning system that is represented by a.b.build where a is the overall version (will be 0 for prototype, alpha and beta versions, 1 for major release), b is

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 19:17

    You can use git commit count of the current branch as the build number. Use this command line to get the commit count: git rev-list HEAD --count.

    Integrating with the build tools will be quite straightforward. If you are using Gradle then you can use this plugin: https://github.com/rockerhieu/Versionberg/

提交回复
热议问题