Skip to content

Commit

Permalink
Update release code (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-majlis authored Aug 24, 2024
1 parent 73b750d commit 200f9c6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ help:
pypi-html:
python3 setup.py --long-description | rst2html.py > pypi-doc.html

run-pre-commit:
pre-commit run -a

run-tests:
python3 -m unittest discover tests/ '*test.py'

Expand All @@ -43,10 +46,10 @@ requirements-dev:
requirements-build:
pip install -r requirements-build.txt

pre-release-check: run-type-check run-flake8 run-coverage pypi-html run-tox
pre-release-check: run-pre-commit run-type-check run-flake8 run-coverage pypi-html run-tox
echo "Pre-release check was successful"

release:
release: pre-release-check
if [ "x$(MSG)" = "x" -o "x$(VERSION)" = "x" ]; then \
echo "Use make release MSG='some msg' VERSION='1.2.3'"; \
exit 1; \
Expand Down Expand Up @@ -90,9 +93,9 @@ release:
sed -ri 's/^release = .*/release = "'$(VERSION)'"/' conf.py; \
sed -ri 's/^version = .*/version = "'$$short_VERSION'"/' conf.py; \
sed -ri 's/^__version__ = .*/__version__ = ('"$$commas_VERSION"')/' wikipediaapi/__init__.py; \
git commit setup.py conf.py wikipediaapi/__init__.py -m "Update version to $(VERSION) for new release."; \
git push; \
git tag v$(VERSION) -m "$(MSG)"; \
git commit .github CHANGES.rst setup.py conf.py wikipediaapi/__init__.py -m "Update version to $(VERSION) for new release." && \
git push && \
git tag v$(VERSION) -m "$(MSG)" && \
git push --tags origin master


Expand Down

0 comments on commit 200f9c6

Please sign in to comment.