-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
91 lines (57 loc) · 1.64 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
DOCKER_TAG ?= latest
PYTHON ?= python3
core: py/janitor/site/_static/pygments.css build-inplace
build-inplace:
$(PYTHON) setup.py build_ext -i
$(PYTHON) setup.py build_protobuf
all: core
.PHONY: all check
check:: typing
check:: test
check:: style
check:: ruff
check:: check-format
check-format::
ruff format --check py tests
check-format::
cargo fmt --check --all
ruff:
ruff check py tests
fix:: ruff-fix
fix:: cargo-fix
cargo-fix:
cargo clippy --fix
ruff-fix:
ruff check --fix .
reformat::
ruff format py tests
reformat::
cargo fmt --all
suite-references:
git grep "\\(lintian-brush\|lintian-fixes\|debianize\|fresh-releases\|fresh-snapshots\\)" | grep -v .example
test:: build-inplace
PYTHONPATH=$(shell pwd)/py:$(PYTHONPATH) PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python $(PYTHON) -m pytest -vv tests
test::
cargo test
style:: yamllint
yamllint:
yamllint .github/
style:: djlint
djlint:
djlint -i J018,H030,H031,H021 --profile jinja py/janitor/site/templates
typing:
$(PYTHON) -m mypy py/janitor tests
py/janitor/site/_static/pygments.css:
pygmentize -S default -f html > $@
clean:
SHA=$(shell git rev-parse HEAD)
docker-%: core
buildah build --no-cache -t ghcr.io/jelmer/janitor/$*:$(DOCKER_TAG) -t ghcr.io/jelmer/janitor/$*:$(SHA) -f Dockerfile_$* .
buildah push ghcr.io/jelmer/janitor/$*:$(DOCKER_TAG)
buildah push ghcr.io/jelmer/janitor/$*:$(SHA)
docker-all: docker-site docker-runner docker-publish docker-archive docker-worker docker-git_store docker-bzr_store docker-differ docker-ognibuild_dep
reformat:: reformat-html
reformat-html:
djlint --reformat --format-css py/janitor/site/templates/
codespell:
codespell