From d32f625b53feed592ac701a8493a634208b64e75 Mon Sep 17 00:00:00 2001 From: Henrik Finsberg Date: Tue, 14 Nov 2023 12:56:52 +0100 Subject: [PATCH] =?UTF-8?q?Add=20bump-my-version=20config=C2=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CITATION.cff | 2 +- pyproject.toml | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 88bb450..19ebe5f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -8,7 +8,7 @@ authors: given-names: "Hew" orcid: "https://orcid.org/0000-0000-0000-0000" title: "My Research Software" -version: 2.0.4 +version: 1.1.0 doi: 10.5281/zenodo.1234 date-released: 2017-12-18 url: "https://github.com/scientificcomputing/example-paper" diff --git a/pyproject.toml b/pyproject.toml index a8a9a03..5a1572a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ dependencies = [ [project.optional-dependencies] dev = [ "pdbpp", + "bump-my-version", "pre-commit", ] docs = [ @@ -70,3 +71,28 @@ target-version = "py310" [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 + + +[tool.bumpversion] +allow_dirty = false +commit = true +message = "Bump version: {current_version} → {new_version}" +tag = true +sign_tags = false +tag_name = "v{new_version}" +tag_message = "Bump version: {current_version} → {new_version}" +current_version = "0.2.0" +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" +serialize = [ + "{major}.{minor}.{patch}" +] + +[[tool.bumpversion.files]] +filename = "pyproject.toml" +search = 'version = "{current_version}"' +replace = 'version = "{new_version}"' + +[[tool.bumpversion.files]] +filename = "CITATION.cff" +search = "version: {current_version}" +replace = "version: {new_version}"