-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (35 loc) · 1001 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
NS := lujenii
PRJ := volatile
PKG := $(subst -,_,$(PRJ))
IMG := docker.io/$(NS)/$(PRJ)
TAG ?= $(shell git describe --tags)
WHO ?= $(shell whoami)
help:
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort
build: ## build the current tag and latest version
DOCKER_BUILDKIT=1 docker build --ssh default -t $(IMG):$(TAG) .
DOCKER_BUILDKIT=1 docker build --ssh default -t $(IMG):latest .
push: build ## push the current tag and latest version [deps:build]
docker push $(IMG):$(TAG)
docker push $(IMG):latest
black-check:
black --check $(PKG) tests
flake8-check:
flake8 $(PKG) tests
isort-check:
isort --diff $(PKG) tests
bandit-check:
bandit -r $(PKG)
radon-check:
radon cc -s -a $(PKG)
radon mi -s $(PKG)
qa-check: black-check flake8-check isort-check radon-check bandit-check
black:
black $(PKG) tests
isort:
isort $(PKG) tests
qa: black isort
safety:
safety check -r requirements.txt
test:
pytest