我有一个关于GitHub(ModelicaRes)的Python项目。我试着跟着Semantic Versioning。我发布主项目站点的发布并上传到PyPI。{u{I>释放版本号{。在发布之间,我会将更新推送到GitHub(通常在主分支上——没什么特别的)。在
如何设置这些版本间更新的版本号?提交通常是工作副本。它们还没有完全测试,但其他人可能会下载并使用这些副本(通过GitHub)。通常,我还没准备好确定新版本号。最近,我将版本号设置为None,并将自动生成的"UNRELEASED COPY" file放入基本文件夹中,其中包含提交日期和其他信息。然而,我不相信这是最好的方法。在
这可能适用于其他语言,但现在我只对Python感兴趣。在
我想我可以尝试在下一个版本号上使用一个“alpha”、“beta”或“rc”后缀,但我也不总是知道下一个版本号(可能是主要版本或次要版本,也可能是错误修复)。我还想保持这个简单——不要太多分支,等等
谢谢!在
如果你推送的代码不是“发布的”,你就没有遵循语义版本控制。对于SemVer,每个更新都是一个版本:对于新的向后兼容功能,要么是次要版本-2.1.0;对于bug修复,要么是补丁-2.1.1。在
关于Python包/发行版版本控制的当前建议摘要见Python Packaging User Guide here:
遵循draft PEP 440的建议。在
Daniel不太正确:Semantic versioning确实支持预发布(emphasis mine):
相关问题 更多 >
编程相关推荐