Skip to content

Commit

Permalink
Add bumpver to automatically bump and tag versions
Browse files Browse the repository at this point in the history
  • Loading branch information
maiksprenger committed Sep 10, 2022
1 parent 8fb2c27 commit 9dc69b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ Uploading a new wheel happens with `hatchling` and `twine`:

First, update version number in `pyproject.toml`.

$ black .
$ git tag 0.x.x
$ git push --tags
$ bumpver update --patch
$ python3 -m pip install --upgrade build twine
$ rm dist/* && python3 -m build
$ python3 -m twine upload dist/*
$ git push --tags
20 changes: 18 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "django-cal"
version = "0.4.2"
version = "0.4.1"
authors = [
{ name = "Maik Hoepfel", email = "[email protected]" },
]
Expand All @@ -28,7 +28,9 @@ dependencies = [

[project.optional-dependencies]
tests = [
"pytest", "pytest-django", "pre-commit", "isort", "black", "flake8", "pyupgrade"
"pytest", "pytest-django",
"pre-commit", "isort", "black", "flake8", "pyupgrade",
"bumpver"
]

[project.urls]
Expand Down Expand Up @@ -83,3 +85,17 @@ ignore = [
# https://black.readthedocs.io/en/stable/the_black_code_style.html
[tool.isort]
profile = "black"

[tool.bumpver]
current_version = "0.4.1"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "Bump version {old_version} -> {new_version}"
commit = true
tag = true
push = false

[tool.bumpver.file_patterns]
"pyproject.toml" = [
'current_version = "{version}"',
'version = "{version}"',
]

0 comments on commit 9dc69b9

Please sign in to comment.