Skip to content

Commit ad7903c

Browse files
committed
Add bump_version_check make target
1 parent c435689 commit ad7903c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Makefile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ SPHINXBUILD_WARNING_LOG = sphinx-warnings.log
3636
SPHINXAUTOBUILD := sphinx-autobuild
3737
SPHINXAUTOBUILD_OPTS := --watch ${PACKAGE_DIR} --ignore ${DOCS_REFERENCE_DIR}
3838

39+
BUMPVERSION_DIFF_FILES := diff-files.txt
40+
3941
.PHONY: help
4042
help: ## Display this help screen
4143
@grep -E '^[\.a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@@ -104,12 +106,19 @@ build_package: ## build package (source + wheel)
104106
${PYTHON} setup.py bdist_wheel
105107

106108
.PHONY: bump_version_patch
107-
bump_version_patch: ## bump package version by the patch part
108-
bump2version patch
109+
bump_version_patch: bump_version_check ## bump package version by the patch part
110+
git add CHANGELOG.md
111+
bump2version patch --allow-dirty
109112

110113
.PHONY: bump_version_minor
111-
bump_version_minor: ## bump package version by the minor part
112-
bump2version minor
114+
bump_version_minor: bump_version_check ## bump package version by the minor part
115+
git add CHANGELOG.md
116+
bump2version minor --allow-dirty
117+
118+
.PHONY: bump_version_check
119+
bump_version_check:
120+
git diff --name-status
121+
git diff-files --name-only | grep -q CHANGELOG.md
113122

114123
.PHONY: build_docs
115124
build_docs: ## build documentation

0 commit comments

Comments
 (0)