Semantic Versioning and Releases
- MAJOR version: incremented for incompatible API changes;
- MINOR version: incremented for backward-compatible new features;
- PATCH version: incremented for backward-compatible bug fixes or small improvements.
Understanding how to manage versions is crucial when developing a C++ library. Semantic versioning, often called semver, is the most widely adopted standard for versioning libraries and software. It uses a three-part version number: MAJOR.MINOR.PATCH. Each segment of this version number communicates important information to library consumers about the nature of changes in each release.
You increment the MAJOR version when you make incompatible API changes that could break existing code using your library. The MINOR version is incremented when you add new functionality in a backward-compatible manner, such as introducing new functions or classes without changing or removing existing ones. The PATCH version increases when you make backward-compatible bug fixes or small improvements that don’t affect the API or add new features.
Applying semantic versioning correctly allows users of your library to understand whether an update is safe to adopt, or if they need to make changes to their own code. It also helps you, as the author, to communicate the impact of your changes clearly and maintain trust with your users.
version.hpp
CHANGELOG.md
1234567#pragma once #define MYLIBRARY_VERSION_MAJOR 2 #define MYLIBRARY_VERSION_MINOR 1 #define MYLIBRARY_VERSION_PATCH 5 #define MYLIBRARY_VERSION "2.1.5"
Obrigado pelo seu feedback!
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Can you give examples of version number changes for different scenarios?
How do I decide when to increment each part of the version number?
Are there tools to help automate semantic versioning for C++ projects?
Incrível!
Completion taxa melhorada para 7.14
Semantic Versioning and Releases
Deslize para mostrar o menu
- MAJOR version: incremented for incompatible API changes;
- MINOR version: incremented for backward-compatible new features;
- PATCH version: incremented for backward-compatible bug fixes or small improvements.
Understanding how to manage versions is crucial when developing a C++ library. Semantic versioning, often called semver, is the most widely adopted standard for versioning libraries and software. It uses a three-part version number: MAJOR.MINOR.PATCH. Each segment of this version number communicates important information to library consumers about the nature of changes in each release.
You increment the MAJOR version when you make incompatible API changes that could break existing code using your library. The MINOR version is incremented when you add new functionality in a backward-compatible manner, such as introducing new functions or classes without changing or removing existing ones. The PATCH version increases when you make backward-compatible bug fixes or small improvements that don’t affect the API or add new features.
Applying semantic versioning correctly allows users of your library to understand whether an update is safe to adopt, or if they need to make changes to their own code. It also helps you, as the author, to communicate the impact of your changes clearly and maintain trust with your users.
version.hpp
CHANGELOG.md
1234567#pragma once #define MYLIBRARY_VERSION_MAJOR 2 #define MYLIBRARY_VERSION_MINOR 1 #define MYLIBRARY_VERSION_PATCH 5 #define MYLIBRARY_VERSION "2.1.5"
Obrigado pelo seu feedback!