[英]Using semver, should pre-release versions be based off the previous version number, or the next version number?
Doing a pseudo-CD strategy for dev environments and we want to make sure all interim builds are tagged and versioned in a way that provides traceability but also conforms to semver so that helm etc doesn't yell at us and also I can sleep at night knowing I've bikeshedded correctly.为开发环境制定伪 CD 策略,我们希望确保所有临时构建都以提供可追溯性但又符合 semver 的方式进行标记和版本化,这样 helm 等就不会对我们大喊大叫,而且我可以在晚上睡觉知道我已经正确地骑自行车了。 I was thinking about the semantics of semver and how intra-release builds/versions might be tagged.我在考虑 semver 的语义以及如何标记内部版本构建/版本。
Assuming our process doesn't provide sufficient reliability for a "look-ahead" version (eg I don't know if our next release is going to be a major, minor, or patch increment), what would the best practice be for applying versions to builds between releases.假设我们的流程没有为“前瞻”版本提供足够的可靠性(例如,我不知道我们的下一个版本是主要的、次要的还是补丁增量),应用的最佳实践是什么版本之间的版本构建。
eg例如
Given last release of 1.2.3鉴于 1.2.3 的最新版本
Given a timestamp postfix for build metadata (eg a build might be called {version}-1668519441 )给定构建元数据的时间戳后缀(例如,构建可能称为 {version}-1668519441 )
Given that I don't know if the next official release is going to be 2.0.0, 1.3.0, or 1.2.4鉴于我不知道下一个正式版本是 2.0.0、1.3.0 还是 1.2.4
Do I:我:
Reasonable smart will be "modified 1" (because "internal builds" are just builds, for which we have to have "some id", which must just allow internal identification of it and nothing more): Reasonable smart将是“modified 1”(因为“内部构建”只是构建,我们必须有“some id”,它必须只允许内部识别它,仅此而已):
with something like git describe HEAD
you'll get 1.2.3--14-g2414721
, 1.2.3-21-g975b
, 1.2.3-25-g2dc6
etc and any of these builds later according to (existing, I hope) Release Policy may become 1.2.4, 1.3.x or even 2.xx (see idea of conventional commits and versioning of releases based on it), "just because..."使用类似git describe HEAD
的内容,您将获得1.2.3--14-g2414721
、 1.2.3-21-g975b
、 1.2.3-25-g2dc6
等以及稍后根据(我希望是现有版本)发布的任何这些版本政策可能会变成 1.2.4、1.3.x 甚至 2.xx(请参阅基于它的常规提交和版本控制的想法),“只是因为……”
Answer 3 is daring and unequivocal version, but it's bad, because it does not answer the question and does not give at least a mediocre solution to the problem, but it's bad, because it does not answer the question and does not give at least a mediocre solution to the problem答案 3 是大胆而明确的版本,但它很糟糕,因为它没有回答问题,也没有给出至少一个平庸的解决方案,但它很糟糕,因为它没有回答问题,也没有给出至少一个平庸的解决方案问题的平庸解决方案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.