38 lines
681 B
Makefile
38 lines
681 B
Makefile
POETRY ?= poetry run
|
|
SRC := tailscalesd
|
|
TESTS := tests
|
|
SHELL := $(shell which bash)
|
|
APP_VERSION := $(shell git rev-parse --short HEAD)
|
|
|
|
docker-build:
|
|
DOCKER_BUILDKIT=1 docker build -f docker/Dockerfile \
|
|
--build-arg=$(APP_VERSION) \
|
|
-t tailscalesd:latest \
|
|
.
|
|
|
|
freeze:
|
|
poetry export --format=requirements.txt > requirements.frozen.txt
|
|
|
|
fmt:
|
|
$(POETRY) black $(SRC)
|
|
$(POETRY) black $(TESTS)
|
|
$(POETRY) isort --profile black $(SRC)
|
|
$(POETRY) isort --profile black $(TESTS)
|
|
|
|
check:
|
|
$(MAKE) fmt
|
|
$(MAKE) lint
|
|
$(MAKE) types
|
|
$(MAKE) bandit
|
|
|
|
lint:
|
|
$(POETRY) flake8 $(SRC)
|
|
|
|
bandit:
|
|
$(POETRY) bandit -r $(SRC)
|
|
|
|
types:
|
|
$(POETRY) mypy $(SRC)
|
|
|
|
test:
|
|
$(POETRY) pytest $(TESTS)
|