diff --git a/Makefile b/Makefile index 58f86b2..6fe8067 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ doc: develop $(DOC_INDEX) clean: pip uninstall django-el-pagination -y || true - rm -rfv .coverage build/ dist/ doc/_build MANIFEST *.egg-info + rm -rf .coverage build/ dist/ doc/_build MANIFEST *.egg-info find . -name '*.pyc' -delete find . -name '__pycache__' -type d -delete @@ -49,9 +49,6 @@ lint: develop opendoc: doc @firefox $(DOC_INDEX) -release: clean - python setup.py register sdist upload - server: develop @$(WITH_VENV) $(MANAGE) runserver 0.0.0.0:8000 @@ -64,6 +61,43 @@ source: test: develop @$(WITH_VENV) $(MANAGE) test +build-dist: clean develop + @echo "Installing build dependencies..." + $(VENV)/bin/pip install build twine + @echo "Building distribution..." + $(VENV)/bin/python -m build + +check-dist: build-dist + @echo "Checking distribution..." + $(VENV)/bin/twine check dist/* + +upload-dist: check-dist + @echo "Uploading to PyPI..." + $(VENV)/bin/twine upload dist/* + +release: clean develop + @echo "Starting release process..." + @if [ -z "$$SKIP_CONFIRMATION" ]; then \ + read -p "Are you sure you want to release to PyPI? [y/N] " confirm; \ + if [ "$$confirm" != "y" ]; then \ + echo "Release cancelled."; \ + exit 1; \ + fi \ + fi + $(MAKE) build-dist + $(MAKE) check-dist + @echo "Ready to upload to PyPI..." + @if [ -z "$$SKIP_CONFIRMATION" ]; then \ + read -p "Proceed with upload? [y/N] " confirm; \ + if [ "$$confirm" != "y" ]; then \ + echo "Upload cancelled."; \ + exit 1; \ + fi \ + fi + $(MAKE) upload-dist + @echo "Release completed successfully!" + + help: @echo 'Django Endless Pagination - Available commands:' @echo diff --git a/README.rst b/README.rst index 9f38e1a..1e4d985 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ Django EL(Endless) Pagination ============================= | |pypi-pkg-version| |python-versions| |django-versions| |pypi-status| |docs| -| |build-ci-status| |build-ci-dev-status| |codecov| +| |build-ci-status| |tox-ci-status| |codecov| Django EL(Endless) Pagination can be used to provide Twitter-style or Digg-style pagination, with optional Ajax support and other features @@ -32,11 +32,12 @@ https://github.com/shtalinberg/django-el-pagination. Pull requests are welcome. See `Contributing Guide `_. -.. |build-ci-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml/badge.svg?branch=master - :target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml - :alt: Build status -.. |docs| image:: https://readthedocs.org/projects/django-el-pagination/badge/?version=latest&style=flat - :target: https://django-el-pagination.readthedocs.io/ +.. |build-ci-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml/badge.svg?branch=master + :target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml + :alt: Build release status +.. |docs| image:: https://readthedocs.org/projects/django-el-pagination/badge/?version=latest + :target: https://django-el-pagination.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status .. |pypi-pkg-version| image:: https://img.shields.io/pypi/v/django-el-pagination.svg :target: https://pypi.python.org/pypi/django-el-pagination/ .. |pypi-status| image:: https://img.shields.io/pypi/status/coverage.svg @@ -46,6 +47,6 @@ Pull requests are welcome. See `Contributing Guide .. |codecov| image:: https://codecov.io/gh/shtalinberg/django-el-pagination/branch/master/graph/badge.svg :target: https://codecov.io/gh/shtalinberg/django-el-pagination :alt: Code coverage -.. |build-ci-dev-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml/badge.svg?branch=develop - :target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tests.yml - :alt: Build dev status +.. |tox-ci-status| image:: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml/badge.svg?branch=develop + :target: https://github.com/shtalinberg/django-el-pagination/actions/workflows/tox.yml + :alt: Tox develop status