Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using semver (Semantic Versioning) should the patch version Z (x.y.Z) be returned to 0 when Y is changed?

From Semantic Versioning:

Patch version Z (x.y.Z | x > 0) MUST be incremented if only backwards compatible bug fixes are introduced. A bug fix is defined as an internal change that fixes incorrect behavior.

Suppose I have a program at version 0.1.12. If I had to increment Y (0.Y.12), should I return Z (0.2.Z) to 0 (becoming 0.2.0) or just keep it unaltered (becoming 0.2.12)?

like image 653
Somebody still uses you MS-DOS Avatar asked Sep 09 '11 18:09

Somebody still uses you MS-DOS


People also ask

Does semantic versioning start 0 or 1?

But it turns out that the semantic versioning spec does recommend to start initial development at 0.1. 0. If you really do not want to support 0.

When should a version number change?

There are simple rules that indicate when you must increment each of these versions: MAJOR is incremented when you make breaking API changes. MINOR is incremented when you add new functionality without breaking the existing API or functionality. PATCH is incremented when you make backwards-compatible bug fixes.

What are semantic versioning rules?

Semantic Versioning is a versioning scheme for using meaningful version numbers (that's why it is called Semantic Versioning). Specifically, the meaning revolves around how API versions compare in terms of backwards-compatibility.

What is semantic versioning format?

Semantic versioning is a formal convention for determining the version number of new software releases. The standard helps software users to understand the severity of changes in each new distribution. A project that uses semantic versioning will advertise a Major, Minor and Patch number for each release.

What should be the first semantic version?

Major version zero (0. y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.

What is patch in versioning?

A patch version enables a developer to change the functionality of existing components in a managed package, while ensuring that subscribers experience no visible changes to the package. Patches should be considered as minor upgrades to a. Managed - Released package and only used for fixing bugs or other errors.


1 Answers

Yes. All numbers should be reset when their parent version is changed.

The specification (http://semver.org/) states:

Patch version MUST be reset to 0 when minor version is incremented.

like image 161
Sam Bloomberg Avatar answered Oct 13 '22 11:10

Sam Bloomberg