-
Notifications
You must be signed in to change notification settings - Fork 421
/
Copy pathMakefile
63 lines (47 loc) · 1.41 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
target:
@$(MAKE) pr
dev:
pip install --upgrade pip poetry
poetry install
format:
poetry run isort -rc .
poetry run black aws_lambda_powertools
poetry run black tests
lint: format
poetry run flake8
test:
poetry run pytest -vvv
coverage-html:
poetry run pytest --cov-report html
pr: lint test security-baseline complexity-baseline
build: pr
poetry run build
docs: dev
poetry run pdoc --html --output-dir docs ./aws_lambda_powertools --force
docs-dev:
poetry run pdoc --http : aws_lambda_powertools
security-baseline:
poetry run bandit --baseline bandit.baseline -r aws_lambda_powertools
complexity-baseline:
$(info Maintenability index)
poetry run radon mi aws_lambda_powertools
$(info Cyclomatic complexity index)
poetry run xenon --max-absolute C --max-modules A --max-average A aws_lambda_powertools
#
# Use `poetry version <major>/<minor></patch>` for version bump
#
release-prod:
poetry config pypi-token.pypi ${PYPI_TOKEN}
poetry publish -n
release-test:
poetry config repositories.testpypi https://test.pypi.org/legacy
poetry config pypi-token.pypi ${PYPI_TEST_TOKEN}
poetry publish --repository testpypi -n
build-linux-wheels:
poetry build
docker run --env PLAT=manylinux1_x86_64 --rm -it -v ${PWD}:/io -w /io quay.io/pypa/manylinux1_x86_64 /io/build_linux_wheels.sh
cp ./wheelhouse/* dist/ && rm -rf wheelhouse
release:
$(MAKE) build-linux-wheels
$(MAKE) release-test
$(MAKE) release-prod