Skip to content

Commit

Permalink
minor fix to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mivanit committed Sep 10, 2024
1 parent 6080f88 commit 96306fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LAST_VERSION := NULL
PYTHON_VERSION := NULL
.PHONY: gen-version-info
gen-version-info:
$(eval VERSION := $(shell python -c "import re; print('v'+re.search(r'^version\s*=\s*\"(.+?)\"', open('$(PYPROJECT)').read(), re.MULTILINE).group(1))") )
$(eval VERSION := $(shell python -c "import re; print('v'+re.search(r'^version\s*=\s*\"(.+?)\"', open('$(PYPROJECT)').read(), re.MULTILINE).group(1))"))
$(eval LAST_VERSION := $(shell [ -f $(LAST_VERSION_FILE) ] && cat $(LAST_VERSION_FILE) || echo NULL) )
$(eval PYTHON_VERSION := $(shell $(PYTHON) -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')") )

Expand All @@ -45,8 +45,8 @@ default: help
.PHONY: version
version: gen-commit-log
@echo "current and last-published version, commit log"
@echo "current-version: $(VERSION)"
@echo "last-published-version: $(LAST_VERSION)"
@echo "current-version: '$(VERSION)'"
@echo "last-published-version: '$(LAST_VERSION)'"
@echo "Commit log since last version:"
@cat $(COMMIT_LOG_FILE)
@if [ "$(VERSION)" = "$(LAST_VERSION)" ]; then \
Expand Down Expand Up @@ -232,6 +232,7 @@ publish: gen-commit-log check build verify-git version gen-version-info
@echo "Enter the new version number if you want to upload to pypi and create a new tag"
@read -p "Confirm: " NEW_VERSION; \
if [ "$$NEW_VERSION" != "$(VERSION)" ]; then \
echo "'$$NEW_VERSION' is not the same as '$(VERSION)', exiting!"; \
echo "Confirmation failed, exiting!"; \
exit 1; \
fi; \
Expand Down

0 comments on commit 96306fb

Please sign in to comment.