Makefile
RUFF_FORMATTED_FOLDERS = sanic examples scripts tests guide docs.DEFAULT: help .PHONY: helphelp: @echo "Please use \`make <target>' where <target> is one of" @echo "install" @echo " Install Sanic" @echo "docker-test" @echo " Run Sanic Unit Tests using Docker" @echo "fix" @echo " Analyze and fix linting issues using ruff" @echo "format" @echo " Analyze and format using ruff" @echo "pretty" @echo " Analyze and fix linting and format using ruff" @echo "" @echo "docs" @echo " Generate Sanic documentation" @echo "" @echo "clean-docs" @echo " Clean Sanic documentation" @echo "" @echo "docs-test" @echo " Test Sanic Documentation for errors" @echo "" @echo "changelog" @echo " Generate changelog for Sanic to prepare for new release" @echo "" @echo "release" @echo " Prepare Sanic for a new changes by version bump and changelog" @echo "" .PHONY: cleanclean: find . ! -path "./.eggs/*" -name "*.pyc" -exec rm {} \; find . ! -path "./.eggs/*" -name "*.pyo" -exec rm {} \; find . ! -path "./.eggs/*" -name ".coverage" -exec rm {} \; rm -rf build/* > /dev/null 2>&1 rm -rf dist/* > /dev/null 2>&1 .PHONY: view-coverageview-coverage: sanic ./coverage --simple .PHONY: installinstall: python -m pip install . .PHONY: docker-testdocker-test: clean docker build -t sanic/test-image -f docker/Dockerfile . docker run -t sanic/test-image tox .PHONY: fixfix: ruff check ${RUFF_FORMATTED_FOLDERS} --fix .PHONY: formatformat: ruff format ${RUFF_FORMATTED_FOLDERS} .PHONY: prettypretty: format fix .PHONY: docs-cleandocs-clean: cd docs && make clean .PHONY: docsdocs: docs-clean cd docs && make html .PHONY: docs-testdocs-test: docs-clean cd docs && make dummy .PHONY: docs-servedocs-serve: sphinx-autobuild docs docs/_build/html --port 9999 --watch ./ .PHONY: changelogchangelog: python scripts/changelog.py .PHONY: guide-serveguide-serve: cd guide && sanic server:app -r -R ./content -R ./style .PHONY: releaserelease:ifdef version python scripts/release.py --release-version ${version} --generate-changelogelse python scripts/release.py --generate-changelogendif