Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release code #164

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
pip3 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

# Catch-all target: route all unknown targets to Sphinx using the new
Expand Down
Loading