-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (31 loc) · 1.11 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
all: lint test dist
.venv-%/.env-ready:
$(eval _VENV=$(patsubst .venv-%/.env-ready,%,$@))
@python -m venv .venv-$(_VENV)
@.venv-$(_VENV)/bin/pip install -r requirements/$(_VENV).txt
@touch $@
clean: clean-dist
clean-all: clean-test clean
clean-deps:
@rm -rf .venv-dist
clean-dist:
@rm -rf build cfn_review_bot.egg-info dist
@rm -f cfn_review_bot/package-version.json
clean-test:
@rm -rf .venv-test
deps-dist: .venv-dist/.env-ready
deps-test: .venv-test/.env-ready
dist: clean-dist deps-dist dist-only
@rm -f cfn_review_bot/package-version.json
dist-only: .venv-dist/.env-ready
@.venv-dist/bin/python setup.py sdist bdist_wheel
lint: deps-test
@.venv-test/bin/flake8 cfn_review_bot --max-line-length=100 --statistics
release: clean-all test dist release-only
release-only: .venv-dist/.env-ready
@.venv-dist/bin/twine upload dist/*
test: deps-test
@.venv-test/bin/python -m unittest -v
version-github-action:
@python cfn_review_bot/_version.py github-action
.PHONY: all clean clean-all clean-deps clean-dist clean-test deps-dist deps-test dist dist-only lint release release-only test version-github-action