mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-07 03:55:26 +00:00
Adjust Makefile
This commit is contained in:
parent
d1ba6a6b3f
commit
4de05c4f69
29
Makefile
29
Makefile
@ -1,34 +1,13 @@
|
|||||||
PACKAGE_NAME := zundler
|
PACKAGE_NAME := zundler
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf build __pycache__ *.egg-info docs/_build .docvenv .tox dist $(PACKAGE_NAME)/*.egg-info $(PACKAGE_NAME)/__pycache__
|
@rm -rf build __pycache__ *.egg-info docs/_build .docvenv .nox 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
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
tox
|
nox
|
||||||
|
|
||||||
# \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
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
python -m build
|
hatch build
|
||||||
|
|
||||||
test-publish:
|
test-publish:
|
||||||
@file=$$(ls -1t dist/$(PACKAGE_NAME)-*.tar.gz | head -n1); \
|
@file=$$(ls -1t dist/$(PACKAGE_NAME)-*.tar.gz | head -n1); \
|
||||||
@ -42,4 +21,4 @@ publish:
|
|||||||
if [ $$ans = 'yes' ] ; then twine upload $$file ; fi
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user