【问题标题】:Change the version automatically using Gradle Release plugin使用 Gradle Release 插件自动更改版本
【发布时间】:2019-04-10 02:32:23
【问题描述】:

我希望在 master 分支的每次提交上都有一个新版本。

由于我使用 gradle 构建,我发现了 2 个不错的插件,Release https://github.com/researchgate/gradle-release/issues/273 和 Git Versioner https://github.com/passsy/gradle-gitVersioner-plugin

我想使用 1.0.0.BuildNumber 等版本管理每日提交。这需要在 Git 中创建一个标签并推送,但我还需要使用正确的版本设置 project.version 标签,因为我需要它用于 springBoot buildInfo(我在 Spring 中获取 BuildProperties 以了解我的版本执行)。

当我尝试运行时:

gradlew release -Prelease.useAutomaticVersion=true

它总是回退到 0.0.1 版本。

我只是使用插件的默认配置,我迷路了……

【问题讨论】:

    标签: spring git gradle


    【解决方案1】:

    我仍然定义了旧的 project.version,并且插件默认为那个。

    【讨论】:

      猜你喜欢
      • 2016-02-26
      • 2013-10-07
      • 1970-01-01
      • 2020-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-06
      相关资源
      最近更新 更多