2021-04-05 12:38:38 -04:00
|
|
|
REQUIREMENTS_TXT ?= requirements.txt dev-requirements.txt
|
2021-01-08 20:56:39 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
include Makefile.venv
|
|
|
|
Makefile.venv:
|
|
|
|
curl \
|
|
|
|
-o Makefile.fetched \
|
|
|
|
-L "https://github.com/sio/Makefile.venv/raw/v2020.08.14/Makefile.venv"
|
|
|
|
echo "5afbcf51a82f629cd65ff23185acde90ebe4dec889ef80bbdc12562fbd0b2611 *Makefile.fetched" \
|
|
|
|
| sha256sum --check - \
|
|
|
|
&& mv Makefile.fetched Makefile.venv
|
2021-01-08 17:23:35 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
all: pip dev
|
2021-01-08 20:56:39 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
.PHONY: dev
|
|
|
|
dev: venv
|
|
|
|
$(VENV)/pre-commit install
|
2021-01-08 20:56:39 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
.PHONY: docs
|
2021-04-05 14:32:36 -04:00
|
|
|
docs: build
|
|
|
|
cp README.rst docs/readme.rst
|
|
|
|
cp Changelog docs/changelog.rst
|
2021-04-05 12:38:38 -04:00
|
|
|
tox -edocs
|
2021-01-08 20:56:39 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
.PHONY: server
|
|
|
|
server: venv
|
|
|
|
$(VENV)/aprsd server --loglevel DEBUG
|
2021-01-08 20:56:39 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
clean: clean-venv
|
2021-01-08 20:56:39 -05:00
|
|
|
rm -rf dist/*
|
2021-01-08 17:23:35 -05:00
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
.PHONY: test
|
2021-01-08 17:23:35 -05:00
|
|
|
test: dev
|
2021-01-15 13:30:07 -05:00
|
|
|
tox -p all
|
2021-01-08 17:23:35 -05:00
|
|
|
|
2021-01-08 20:56:39 -05:00
|
|
|
build: test
|
2021-04-05 12:38:38 -04:00
|
|
|
$(VENV)/python3 setup.py sdist bdist_wheel
|
|
|
|
$(VENV)/twine check dist/*
|
2021-01-08 20:56:39 -05:00
|
|
|
|
|
|
|
upload: build
|
2021-04-05 12:38:38 -04:00
|
|
|
$(VENV)/twine upload dist/*
|
2021-01-08 20:56:39 -05:00
|
|
|
|
2021-02-12 19:46:31 -05:00
|
|
|
docker: test
|
|
|
|
docker build -t hemna6969/aprsd:latest -f docker/Dockerfile docker
|
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
docker-dev: test
|
|
|
|
docker build -t hemna6969/aprsd:master -f docker/Dockerfile-dev docker
|
|
|
|
|
|
|
|
update-requirements: dev
|
|
|
|
$(VENV)/pip-compile requirements.in
|
|
|
|
$(VENV)/pip-compile dev-requirements.in
|
2021-01-08 17:23:35 -05:00
|
|
|
|
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
check: dev # Code format check with isort and black
|
2021-01-08 17:23:35 -05:00
|
|
|
tox -efmt-check
|
|
|
|
tox -epep8
|
|
|
|
|
2021-04-05 12:38:38 -04:00
|
|
|
fix: dev # fixes code formatting with isort and black
|
2021-01-09 09:58:56 -05:00
|
|
|
tox -efmt
|