forked from kapicorp/kapitan
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
45 lines (39 loc) · 1.19 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
all: clean package
.PHONY: test
test:
@echo ----- Running python tests -----
python3 -m unittest discover
@echo ----- Testing build of docker image -----
docker build . --no-cache -t kapitan
@echo ----- Testing run of docker image -----
docker run -ti --rm kapitan --help
docker run -ti --rm kapitan lint
@echo ----- Testing build of docker ci image -----
docker build . --no-cache -t kapitan-ci -f Dockerfile.ci
@echo ----- Testing run of docker ci image -----
docker run -ti --rm kapitan-ci --help
docker run -ti --rm kapitan-ci lint
.PHONY: test_coverage
test_coverage:
@echo ----- Testing code coverage -----
coverage run --source=kapitan --omit="*reclass*" -m unittest discover
coverage report --fail-under=60 -m
.PHONY: release
release:
ifeq ($(version),)
@echo Please pass version to release e.g. make release version=0.16.5
else
scripts/inc_version.sh $(version)
endif
.PHONY: package
package:
python3 setup.py sdist bdist_wheel
.PHONY: clean
clean:
rm -rf dist/ build/ kapitan.egg-info/
.PHONY: codestyle
codestyle:
which flake8 || echo "Install flake8 with pip3 install --user flake8"
# ignores line length and reclass related errors
flake8 --ignore E501 . --exclude=reclass
@echo