diff --git a/Makefile b/Makefile index de945d0..f353d09 100644 --- a/Makefile +++ b/Makefile @@ -1,34 +1,13 @@ PACKAGE_NAME := zundler clean: - @rm -rf build __pycache__ *.egg-info docs/_build .docvenv .tox dist $(PACKAGE_NAME)/*.egg-info $(PACKAGE_NAME)/__pycache__ - -docs: - @find .docvenv -maxdepth 0 -type d || python3 -m venv .docvenv ; \ - . .docvenv/bin/activate ; \ - cd docs ; \ - python3 -m pip install -r requirements.txt ; \ - sphinx-build . _build + @rm -rf build __pycache__ *.egg-info docs/_build .docvenv .nox dist $(PACKAGE_NAME)/*.egg-info $(PACKAGE_NAME)/__pycache__ test: - tox - -# \n in sed only works in GNU sed -release: - @read -p "Enter version string (Format: x.y.z): " version; \ - echo "Version Bump: $$version"; \ - date=$$(date +%F); \ - sed -i "s/^version = \".*\"/version = \"$$version\"/" pyproject.toml && \ - sed -i "s/^release = \".*\"/release = \"$$version\"/" docs/conf.py && \ - sed -i "s/^## \[Unreleased\]/## [Unreleased]\n\n## [$$version] - $$date/" CHANGELOG.md && \ - git add CHANGELOG.md pyproject.toml docs/conf.py && \ - git commit -m "Version bump: $$version" && \ - git tag $$version && \ - read -p "Committed and tagged. Do you want push the new version? [y/n] " ans && \ - if [ $$ans = 'y' ] ; then git push && git push --tags && echo "Pushed." ; else echo "Push it yourself then." ; fi + nox build: - python -m build + hatch build test-publish: @file=$$(ls -1t dist/$(PACKAGE_NAME)-*.tar.gz | head -n1); \ @@ -42,4 +21,4 @@ publish: if [ $$ans = 'yes' ] ; then twine upload $$file ; fi -.PHONY: clean docs test release build publish test-publish +.PHONY: clean docs test build publish test-publish