ADR-003 Semantic Versioning
Date: 26-08-2021
Status
✅ Accepted
Context
Establish a pattern and guidlines for versioning all of OPG Digital’s applications and services.
Decision
Semantic Versioning
All services should follow the standard for semantic versioning for their components. This should be handled automatically in the build pipeline for the service based off commit messages added by the developer. This will allow better observability of breaking changes, more obvious discussions around contract testing, and everyone talking in a common language.
Versions should be pushed to github and used as the identifier for any build artifacts.
The accepted standard for semantic versioning is:
v1.234.567
Where:
v{major version}.{minor version}.{patch version}
What determines the version bump:
Major: A large change to the functionality of the application and/or a change to its API that is not backwards compatible with one or more of it’s consumers. e.g. A change in the API contract.
Minor: Adding a new feature or deprecating an existing feature that does not break any consumer contracts.
Patch: An upgrade to a dependency, a refactor of code, or a bug fix that doesn’t break any consumer contracts.
Consequences
Some products may have to do some slight refactoring work to change how they version and tag their artifacts/repositories.