-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.12 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
.PHONY: format format-check pylint typecheck lint test docs build pypy-test pypy-live
PYTHON ?= python3
PLATFORM ?= linux/amd64
PROFILE ?= dev
all: format lint test docs
format:
$(PYTHON) -m black .
$(PYTHON) -m isort --profile=black .
format-check:
$(PYTHON) -m black --check .
$(PYTHON) -m isort --profile=black --check .
pylint:
$(PYTHON) -m pylint tplbuild tests
typecheck:
$(PYTHON) -m mypy tplbuild tests
lint: format-check pylint typecheck
test:
$(PYTHON) -m pytest -sv --cov=tplbuild -m unit tests
build-test:
./tests/run_build_test.sh
docs:
make -C docs html
build:
$(PYTHON) -m build
clean:
rm -rf build dist *.egg-info
pypi-test: build
TWINE_USERNAME=__token__ TWINE_PASSWORD="$(shell gpg -d test.pypi-token.gpg)" \
$(PYTHON) -m twine upload --repository testpypi dist/*
pypi-live: build
TWINE_USERNAME=__token__ TWINE_PASSWORD="$(shell gpg -d live.pypi-token.gpg)" \
$(PYTHON) -m twine upload dist/*
docker-%:
@PROFILE=${PROFILE}
@PLATFORM=${PLATFORM}
docker run --rm -v "$${PWD}:/work" -w /work "$$(./bootstrap.sh base-lookup --platform "$${PLATFORM}" --profile "$${PROFILE}" base-tplbuild)" make $*