1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-05 15:44:40 -04:00
Files
aprsd/Makefile
T

56 lines
1.8 KiB
Makefile
Raw Normal View History

2021-04-05 12:38:38 -04:00
REQUIREMENTS_TXT ?= requirements.txt dev-requirements.txt
2021-09-03 16:49:16 -04:00
.DEFAULT_GOAL := help
2021-01-08 20:56:39 -05:00
2021-09-03 16:49:16 -04:00
.PHONY: dev docs server test
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 - \
2021-09-03 16:49:16 -04:00
&& mv Makefile.fetched Makefile.venv
2021-01-08 17:23:35 -05:00
2021-09-03 16:49:16 -04:00
help: # Help for the Makefile
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
2021-01-08 20:56:39 -05:00
2021-09-03 16:49:16 -04:00
dev: venv ## Create the virtualenv with all the requirements installed
2021-01-08 20:56:39 -05:00
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-09-03 16:49:16 -04:00
clean: clean-venv ## Clean out any build artifacts to start over
2021-01-08 20:56:39 -05:00
rm -rf dist/*
2021-01-08 17:23:35 -05:00
2021-09-03 16:49:16 -04:00
test: dev ## Run all the tox tests
2021-01-15 13:30:07 -05:00
tox -p all
2021-01-08 17:23:35 -05:00
2021-09-03 16:49:16 -04:00
build: test ## Make the build artifact prior to doing an upload
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
2021-09-03 16:49:16 -04:00
upload: build ## Upload a new version of the plugin
2021-04-05 12:38:38 -04:00
$(VENV)/twine upload dist/*
2021-01-08 20:56:39 -05:00
2021-09-03 16:49:16 -04:00
check: dev ## Code format check with tox and pep8
tox -efmt-check
tox -epep8
fix: dev ## fixes code formatting with gray
tox -efmt
server: venv ## Create the virtual environment and run aprsd server --loglevel DEBUG
$(VENV)/aprsd server --loglevel DEBUG
docker: test ## Make a docker container tagged with hemna6969/aprsd:latest
2021-02-12 19:46:31 -05:00
docker build -t hemna6969/aprsd:latest -f docker/Dockerfile docker
2021-09-03 16:49:16 -04:00
docker-dev: test ## Make a development docker container tagged with hemna6969/aprsd:master
2021-04-05 12:38:38 -04:00
docker build -t hemna6969/aprsd:master -f docker/Dockerfile-dev docker
2021-09-03 16:49:16 -04:00
update-requirements: dev ## Update the requirements.txt and dev-requirements.txt files
2021-04-05 12:38:38 -04:00
$(VENV)/pip-compile requirements.in
$(VENV)/pip-compile dev-requirements.in