Skip to content

Instantly share code, notes, and snippets.

@paulghaddad
Created February 11, 2015 18:48
Show Gist options
  • Save paulghaddad/4a0505e8d0062066bfe9 to your computer and use it in GitHub Desktop.
Save paulghaddad/4a0505e8d0062066bfe9 to your computer and use it in GitHub Desktop.
Level Up 7: Understands Semver, external APIs and breaking compatibility
1. Explain the situations under which you bump the patch / minor / major version number on your software.
- The Major version number is incremented when API changes will break past versions of the software (1.0.0 -> 2.0.0)
- The minor version number is incremented when functionality is added that does not break past versions of the software or deprecates API functionality. (1.0.0 -> 1.1.0)
- The patch version number is incremented after backwards-compatible bug fixes. (1.1.0 -> 1.1.1)
2. How does that versioning relate to the consumers of your code?
Semantic Versioning communicates your intentions to your code's users of how your change will affect them. They can, in turn, make flexible dependency decisions. For example, Rails depends on the Sprokets gem. If Sprokets increments its version with a major patch, Rails itself can't depend on the new version of Sprockets working. The Gemfile can then specify the range of versions compatible with Rails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment