我有软件包,需要将其发布在packagist存储库中。我正在使用git作为VCS,目前我的软件包可通过composer安装。
有时在composer.json中,我们可以看到类似的内容:
"version" : "1.0.0-beta2"
或"dev-master"
。
但是我不知道如何创建我的软件包的beta和dev版本? 我不知道我可以在哪里提供库的类型(测试版和开发版)。另外,我不明白为什么在第一种情况下版本类型-beta2作为后缀出现,而在第二种情况下(dev-master)版本类型作为前缀出现。
有人可以解释吗? 谢谢
答案 0 :(得分:1)
They're just tag names in your repository.
Tag/version names should match 'X.Y.Z', or 'vX.Y.Z', with an optional suffix for RC, beta, alpha or patch versions. Here are a few examples of valid tag names:
1.0.0 v1.0.0 1.10.5-RC1 v4.4.4beta2 v2.0.0-alpha v2.0.4-p1
As for dev-master
:
Branches will automatically appear as "dev" versions that are easily installable by anyone that wants to try your library's latest and greatest, but that does not mean you should not tag releases. The use of Semantic Versioning is strongly encouraged.