如何更改包装员标签以稳定释放? [英] How do I change the packagist sticker for stable release?

查看:103
本文介绍了如何更改包装员标签以稳定释放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我编写的开源代码.

This is my open source code I wrote.

> https://github.com/simkimsia/UtilityBehaviors/blob/master/README.mdown

我有一个No Stable Release来自packagist.org

我该如何获得packagist上的稳定释放"标签?

How do I go about having a Stable Release sticker from packagist?

推荐答案

您必须使用版本号标记代码.

You have to tag your code with a version number.

git tag -a 0.0.0

这将声明第一个稳定版本.如果您担心全零版本号,则可以从0.0.1开始.如果可以,请尝试坚持语义版本控制: http://semver.org .之后,您应该将推送到公共存储库,例如git push --tags.

That will declare the first stable version. If you worry about an all-zero version number, you can start with something like 0.0.1 if you want. Try to stick to semantic versioning if you can: http://semver.org. After that you should push the to the public repository, like git push --tags.

请注意,您可以在标签中使用整个稳定性标签数组.有Composer认可的alpha,beta和release候选版本等所有内容.参见 http://getcomposer.org/doc/04-schema.md#version有关如何创建版本号的信息.

Note that you can use the whole array of stability labels in your tags. There is everything from alpha, beta, release candidate recognized by Composer. See http://getcomposer.org/doc/04-schema.md#version for info on how to create a version number.

Packagist然后将扫描您的存储库并处理该标记(这是一个稳定"的发行版),并相应地标记您的软件包(即使使用0.0.0版本号-0.x软件与的24.x软件没有区别)作曲家/包装师的条款).

Packagist will then scan your repository and process that tag, which is a "stable" release, and mark your package accordingly (even with the 0.0.0 version number - 0.x software is not different from 24.x software in terms of Composer/Packagist).

编辑2016-07-14

请注意,如果语义版本控制中的版本号以0.x.y开头,则它们的处理方式有所不同.这不会以任何方式影响标记和发布,但是会影响用户选择和更新发布的软件的方式.如果您发布下一个较小的更新0.x+1,则0.x范围内的任何软件均被视为不兼容. Composer代字号~不会受到此干扰:~0.x(带有x的任何整数)将更新到下一个次要版本.插入符运算符的行为将有所不同:^0.x^0.x.y将保持在0.x范围内,而不是任何0.x+1.y发行版.

Note that version numbers in semantic versioning are handled different if they start with 0.x.y. This does not affect tagging and releasing in any way, but it affects the way users can select and update your released software. Any software in the 0.x range is considered an incompatible if you release the next minor update 0.x+1. The Composer tilde operator ~ will not be disturbed by this: ~0.x (with any integer as x) will update to the next minor version. The caret operator will behave different: ^0.x or ^0.x.y will stay in the 0.x range and not go to any 0.x+1.y release.

解决此问题的最佳方法是从1.x版本开始,并使用稳定性标志指示可能的更改.您可以将1.0.0-alpha1用作第一个发行版,而不是0.0.1,以后的发行版可能是1.0.0-alpha2来表示另一个不稳定"(读取:API尚未完成/稳定)版本,然后转到1.0.0-beta1来获取API稳定的版本,但内部未完成的发行版,然后1.0.0-rc1表示可能对API稳定,在最终的错误修复阶段中完成发行,然后在1.0.0表示最终发行版.更多错误修正将为1.0.1及更高版本,新功能将为1.1.0,不兼容的API更改将为2.0.0.请注意,第一个用户可以使用^1.0.0@beta作为其版本要求,并且随着开发的进行,始终会获得最新的更新,而无需更改其要求(除非您破坏API并以此方式强制进行更新).如果您走0.x路线然后将最终产品发布为1.0.0,这将永远行不通,因为您至少有明显的不兼容更新跳至1.0.

The best way to counter this would be to start with 1.x versions, and use stability flags to indicate possible changes. You can use 1.0.0-alpha1 as your first release instead of 0.0.1, later releases may be 1.0.0-alpha2 for another "unstable" (read: API not finished/stable) release, then go to 1.0.0-beta1 for API-stable, but internally unfinished releases, then 1.0.0-rc1 for possibly API-stable, finished releases during final bugfixing phase, and then 1.0.0 for the final release. More bugfixes will be 1.0.1 and up, new features will be 1.1.0, incompatible API changes will be 2.0.0. Note that the first users may use ^1.0.0@beta as their version requirement, and as development progresses, will always get the newest update without the need to change their requirement (unless you break your API and force updates that way). This will never work if you go the 0.x route and then release the final product as 1.0.0, because you have at least the obvious incompatible update jump to 1.0.

很难在没有未来知识的情况下决定某个软件包是否被证明是有用的并且可以创建一个满意的用户群(谁将从中受益于1.0.0@alpha发行标签),或者这仅仅是一个有趣的实验,没有人在生产中使用它(又名0.x).

It's hard to decide without future knowledge whether a package proves to be useful and creates a happy user base (who will benefit from a 1.0.0@alpha release tag), or if it is only an interesting experiment that nobody is using in production (a.k.a. 0.x).

我个人对内部私有软件包的偏爱是使它们从一开始就成为1.0.我必须处理几个从0.0.1开始的软件包,并且由于它们已经成熟而在更新时有点讨厌,但由于版本步骤不兼容而不能转到1.0,这在辅助软件包中会涉及很多工作.

My personal preference for internal private packages is to make them 1.0 from the start. I have to deal with several packages that started at 0.0.1 and are a bit nasty when updating because they are mature, but cannot go to 1.0 because of that incompatible version step, which would involve a lot of work in secondary packages.

这篇关于如何更改包装员标签以稳定释放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆