Skip to content

Commit

Permalink
build: update Makefile, no more setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jul 31, 2023
1 parent 7fae1e1 commit b1b31aa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ _check_manifest:

.PHONY: check_release _check_version _check_scriv

VERSION := $(shell python -c "import dinghy as d; print(d.__version__)")

check_release: _check_manifest _check_version _check_scriv ## check that we are ready for a release
@echo "Release checks passed"

_check_version:
@if [[ $$(git tags | grep -q -w $$(python setup.py --version) && echo "x") == "x" ]]; then \
echo 'A git tag for this version exists! Did you forget to bump the version in src/dinghy/__init__.py?'; \
@if [[ $$(git tags | grep -q -w $(VERSION) && echo "x") == "x" ]]; then \
echo 'A git tag for $(VERSION) exists! Did you forget to bump the version in src/dinghy/__init__.py?'; \
exit 1; \
fi

Expand All @@ -69,7 +71,7 @@ pypi: ## upload the built distributions to PyPI.
python -m twine upload --verbose dist/*

tag: ## make a git tag with the version number
git tag -a -m "Version $$(python setup.py --version)" $$(python setup.py --version)
git tag -a -m "Version $(VERSION)" $(VERSION)
git push --all

gh_release: ## make a GitHub release
Expand Down

0 comments on commit b1b31aa

Please sign in to comment.