From f907de52cffd795c335326da54151c7a6160cf8d Mon Sep 17 00:00:00 2001 From: Vladimir Domnich Date: Wed, 26 Oct 2022 09:43:12 +0300 Subject: [PATCH] Add versioning guide Signed-off-by: Vladimir Domnich --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da8ea41a..53d9d6b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -188,6 +188,30 @@ If you would like to modify code of the library in the integration with your tes $ pip install -e ../neofs-testlib ``` +# Maintaining guide + +## Versioning +We follow [Semantic Versioning Specification](https://semver.org/) to version this library. To manage version number in the source code, we use [bumpver](https://pypi.org/project/bumpver/) package. + +To update a version of the library, please, take the following steps: +1. Make sure that your have no pending changes in git. +2. Run the following command to update version and commit it to git: + ```shell + $ bumpver update --major # to update major version + $ bumpver update --minor # to update minor version + $ bumpver update --patch # to update the patch component of the version + ``` +3. Sign-off the created commit: + ```shell + $ git commit --amend --signoff + ``` +4. Push the changes to remote. +5. After this commit is merged to upstream, create a tag on the master branch of upstream: + ```shell + $ git tag + $ git push upstream + ``` + ## Building and publishing package To build Python package of the library, please run the following command in the library root directory: ```shell diff --git a/pyproject.toml b/pyproject.toml index 1581df3a..858f235c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ target-version = ["py39"] current_version = "0.2.1" version_pattern = "MAJOR.MINOR.PATCH" commit_message = "Bump version {old_version} -> {new_version}" -commit = false +commit = true tag = false push = false