Files
solo1-cli/Makefile
2019-10-27 22:46:17 +01:00

55 lines
911 B
Makefile

.PHONY: black build clean publish reinstall
# setup development environment
init: update-venv
# ensure this passes before commiting
check: lint
black --check solo/
isort --check-only --recursive solo/
# automatic code fixes
fix: black isort
black:
black solo/
isort:
isort -y --recursive solo/
lint:
flake8 solo/
semi-clean:
rm -rf **/__pycache__
clean: semi-clean
rm -rf venv
rm -rf dist
# Package management
VERSION_FILE := "solo/VERSION"
VERSION := $(shell cat $(VERSION_FILE))
tag:
git tag -a $(VERSION) -m"v$(VERSION)"
git push origin $(VERSION)
build: check
flit build
publish: check
flit --repository pypi publish
venv:
python3 -m venv venv
venv/bin/pip install -U pip
# re-run if dev or runtime dependencies change,
# or when adding new scripts
update-venv: venv
venv/bin/pip install -U pip
venv/bin/pip install -U -r dev-requirements.txt
venv/bin/flit install --symlink