-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathMakefile
51 lines (40 loc) · 911 Bytes
/
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
.ONESHELL:
APP = trufflehog3
IMG = $(APP)-dev
TMP = /tmp/$(APP)
.PHONY: test
test: unittest codecov clean build-docker test-docker
.PHONY: unittest
unittest:
PYTHONPATH="." pytest -vvv
.PHONY: codecov
codecov:
codecov
.PHONY: docs
docs:
pdoc --html --template-dir docs/templates -o $(TMP) -f trufflehog3 \
&& rm docs/*.html \
&& mv $(TMP)/$(APP)/*.html ./docs
.PHONY: build-docker
build-docker:
docker build -f Dockerfile.dev -t $(IMG) .
.PHONY: test-docker
test-docker: build-docker
docker run \
--rm \
--volume ${CURDIR}:/source:ro \
--volume ${CURDIR}/scripts/maketest:/maketest:ro \
--entrypoint /maketest \
$(IMG)
.PHONY: build
build: clean
python3 setup.py sdist bdist_wheel
twine check dist/*
.PHONY: push
push: push-pypi
.PHONY: push-pypi
push-pypi: build
twine upload dist/* -u __token__
.PHONY: clean
clean:
rm -rf build dist *.egg-info .coverage* *coverage* .*cache