Skip to content

Commit 6e35021

Browse files
committed
Add experimental bump2version makefile target.
1 parent 5480e02 commit 6e35021

File tree

4 files changed

+37
-3
lines changed

4 files changed

+37
-3
lines changed

.bumpversion.cfg

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[bumpversion]
2+
current_version = 1.0.0-alpha.2
3+
commit = False
4+
tag = False
5+
tag_name = v{new_version}
6+
message = Bump version: {current_version} → {new_version}
7+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>[^\+]+))?
8+
serialize =
9+
{major}.{minor}.{patch}-{release}
10+
11+
[bumpversion:file:setup.py]
12+
[bumpversion:file:docs/conf.py]

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ clean: ## clean the build
4545
rm -rf build dist py_dependency_injection.egg-info
4646
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
4747

48+
.PHONY: bump_version
49+
bump_version: ## Bump the version
50+
pipenv run bump2version --dry-run release --allow-dirty --verbose
51+
4852
.PHONY: upload-test
4953
upload-test: ## upload package to testpypi repository
5054
TWINE_USERNAME=$(PYPI_USERNAME_TEST) TWINE_PASSWORD=$(PYPI_PASSWORD_TEST) pipenv run twine upload --repository testpypi --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sphinx-autobuild = "2021.3.14"
1313
sphinxcontrib-napoleon = "0.7"
1414
wheel = "0.41.2"
1515
pytest-xdist = "*"
16+
bump2version = "*"
1617

1718
[requires]
1819
python_version = ">=3.7"

Pipfile.lock

Lines changed: 20 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)