我对 next-version
属性的工作原理感到困惑。我阅读了官方文档,只有两行“仅服务器作为基础版本”。我假设它会碰到我在下一次提交时设置的版本。但显然它不是那样工作的。看起来像是在 next-version
中添加当前版本号和版本号,但事实并非如此。希望有人能进一步解释。谢谢。
最佳答案
next-version
is described in the documentation作为:
Allows you to bump the next version explicitly, useful for bumping
main
or a feature with breaking changes a major increment.
您可以将next-version
视为“ future 的”git 标签
。 next-version
的值应该等于 git tag
的值,您将添加到下一个发布提交(来自 develop< 的合并提交
到 main
,例如)。
因为 GitVersion 是 configured to increment
Major
、Minor
或 Patch
,对于某些分支,您可能希望对递增的版本部分进行更多控制。假设 GitVersion 配置为 increment: Patch
,但您知道 develop
中的某些功能需要 Minor
甚至 Major
递增。然后,您可以使用 next-version
显式控制增量。
关于gitversion - 试图了解 GitVersion.yml 中的 "next-version"属性是如何工作的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66950938/