Add make targets for version bumping
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4ee85b876c
commit
56565fdbd5
21
Makefile
21
Makefile
@ -37,6 +37,27 @@ verify-tag-version:
|
|||||||
$(eval TAG_NAME = $(shell [ -n "$(DRONE_TAG)" ] && echo $(DRONE_TAG) || git describe --tags --exact-match))
|
$(eval TAG_NAME = $(shell [ -n "$(DRONE_TAG)" ] && echo $(DRONE_TAG) || git describe --tags --exact-match))
|
||||||
test "v$(shell poetry version | awk '{print $$2}')" = "$(TAG_NAME)"
|
test "v$(shell poetry version | awk '{print $$2}')" = "$(TAG_NAME)"
|
||||||
|
|
||||||
|
.PHONY: bump-patch
|
||||||
|
bump-patch:
|
||||||
|
$(eval NEW_VERSION = $(shell poetry version patch | awk '{print $$6}'))
|
||||||
|
git add pyproject.toml
|
||||||
|
git commit -m "Bump version to $(NEW_VERSION)"
|
||||||
|
git tag "v$(NEW_VERSION)"
|
||||||
|
|
||||||
|
.PHONY: bump-minor
|
||||||
|
bump-minor:
|
||||||
|
$(eval NEW_VERSION = $(shell poetry version minor | awk '{print $$6}'))
|
||||||
|
git add pyproject.toml
|
||||||
|
git commit -m "Bump version to $(NEW_VERSION)"
|
||||||
|
git tag "v$(NEW_VERSION)"
|
||||||
|
|
||||||
|
.PHONY: bump-major
|
||||||
|
bump-major:
|
||||||
|
$(eval NEW_VERSION = $(shell poetry version major | awk '{print $$6}'))
|
||||||
|
git add pyproject.toml
|
||||||
|
git commit -m "Bump version to $(NEW_VERSION)"
|
||||||
|
git tag "v$(NEW_VERSION)"
|
||||||
|
|
||||||
# Upload to pypi
|
# Upload to pypi
|
||||||
.PHONY: upload
|
.PHONY: upload
|
||||||
upload: verify-tag-version build
|
upload: verify-tag-version build
|
||||||
|
Loading…
Reference in New Issue
Block a user