Reputation: 123
I'm trying to understand semantic versioning. Currently my module have 2 major versions as shown below.
1.0.0, 1.1.0, 1.1.1, 1.1.2 .... 2.0.0, 2.1.0
So here i have copule of questions:
Found one bug in all vesions so ineed to fix that bug in all vesrions and update the vesion? or fix and update versions like 1.1.3 and 2.1.1
What if a new release has a feature and a bug fix, what should I increment?
Upvotes: 2
Views: 876
Reputation: 6659
When in doubt, the SemVer spec should always be referenced.
Say you find a bug in the following feature sets:
1.0.x
1.1.x
1.3.x
2.0.x
2.1.x
In each case, a bug fix for that feature level would look like:
1.0.x+1
1.1.x+1
1.3.x+1
2.0.x+1
2.1.x+1
Where x is the highest patch number for each of the feature sets.
Decide whether you need to support earlier versions with bug fixes. At some point, most teams limit down-level work to bug fixes and only go back two or three minor releases in each major series they still support. It's not uncommon to halt all version 1 work after one or two releases in the version 2 series.
Semver 2.0.0 #7 specifies:
Minor version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated. It MAY be incremented if substantial new functionality or improvements are introduced within the private code. It MAY include patch level changes. Patch version MUST be reset to 0 when minor version is incremented.
Basically, you bump either Minor or Major depending on whether you added back-compat features or made breaking changes. You can include all the bug fixes and new features you want in a single release. All lower version fields reset to zero when you bump Major or Minor.
Upvotes: 2