first pass
This commit is contained in:
parent
4691310e22
commit
5150e8ddd4
11 changed files with 2484 additions and 0 deletions
38
Makefile
Normal file
38
Makefile
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue