SEMANTIC VERSIONING
PixelBay.com

SEMANTIC VERSIONING

Versioning: Versioning term is related operating systems, software and web services.  Versioning provides a way in which we can track and manage multiple releases of a product.

The release makes the product improved, upgraded or customised. We distinguish various releases according to their version number. So each release of the product has a unique version number.

MAJOR, MINOR, PATCH

The above format is a general way to represent a version of a product. For any given version number increment the:

  1. MAJOR version when you make a release to a product which makes it incompatible with previous backward releases.
  2. MINOR version when you make  a release to a product which adds functionality that is compatible with previous backward releases.
  3. PATCH version when you make a release to a product which fixed bugs in previous backward compatible releases.

DEPENDENCY HELL

So the question arises why we need this semantic versioning thing. In the galaxy of software management, the bigger your product becomes and the more you integrate packages into your product, the more likely, one day you will be into this pit of dependency hell.

Dependency hell can make anyone very frustrated. Suppose you are working on multiple projects that have dependencies on the same shared packages or libraries, but these projects depend on different and incompatible versions of the shared packages or libraries. When you make dependencies compatible with x project y project will stop working, then you make dependencies compatible with y project x project will stop working. You are stuck in cage of dependency hell.

SOLUTION

As a solution to this problem, Semantic Versioning proposes a simple set of rules and requirements that dictates how version numbers should be assigned and incremented. For this system to work , you communicate changes in your releases by incrementing version number. 

Consider a version format X.Y.Z (Major.Minor.Patch). Bug fixes not affecting or adding the functionality of product increments patch version, backward compatible changes/ additions in the product increments minor version and backward incompatible changes increments major version. 

This system is called “Semantic Versioning”. Under this scheme, version numbers and the way they change convey meaning about the underlying code and what has been modified from one version to another version.

SPECIFICATION:

  1. A normal version must be in the form of X.Y.Z. where X, Y, and Z are non negative integers, and must not contain leading zeros.
  2. Each element in X.Y.Z. (Major.Minor.Patch) must be increased numerically i.e. 1.1.0 -> 1.2.0 -> 1.2.1 
  3. Once the versioned package has been released the content of the version must not be modified.
  4. Major version zero (0.y.z.) is for initial development. Version 1.0.0 defines released public product. This release should be considered as a stable release.


要查看或添加评论,请登录

社区洞察

其他会员也浏览了