forked from kapicorp/kapitan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (49 loc) · 1.5 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
all: clean package
.PHONY: test
test:
@echo ----- Running python tests -----
python3 -m unittest discover
.PHONY: test_docker
test_docker:
@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
.PHONY: test_coverage
test_coverage:
@echo ----- Testing code coverage -----
coverage run --source=kapitan --omit="*reclass*" -m unittest discover
coverage report --fail-under=65 -m
.PHONY: test_formatting
test_formatting:
@echo ----- Testing code formatting -----
black --check .
@echo
.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/ bindist/
.PHONY: format_codestyle
format_codestyle:
which black || echo "Install black with pip3 install --user black"
# ignores line length and reclass
black .
@echo
.PHONY: local_serve_documentation
local_serve_documentation:
docker build -f Dockerfile.docs --no-cache -t kapitan-docs .
docker run --rm -v $(PWD):/docs -p 8000:8000 kapitan-docs
.PHONY: mkdocs_gh_deploy
mkdocs_gh_deploy: # to run locally assuming git ssh access
docker build -f Dockerfile.docs --no-cache -t kapitan-docs .
docker run --rm -it -v $(PWD):/src -v ~/.ssh:/root/.ssh -w /src kapitan-docs gh-deploy -f ./mkdocs.yml