-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
58 lines (58 loc) · 2.13 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
install:
pip install -r requirements.txt
install-dev:
pip install -r dev-requirements.txt
full-install: install install-dev
cd docs && pip install -r requirements.txt && cd ..
lint:
pre-commit run --all-files
docstr:
docstr-coverage rawsec_cli tests --skipinit --failunder 95
tox:
pip install tox tox-gh-actions
tox
test:
coverage run --branch -p -m pytest --capture=sys
coverage:
coverage combine | true && coverage report -m
html:
cd docs && make html && cd ../
deploy:
pip install setuptools wheel twine
echo "[pypi]" >> ~/.pypirc
echo "username = ${PYPI_USERNAME}" >> ~/.pypirc
echo "password = ${PYPI_PASSWORD}" >> ~/.pypirc
python setup.py sdist bdist_wheel
twine upload dist/*
rm -fr build dist
fake-deploy:
pip install setuptools wheel twine
echo "[pypi]" >> ~/.pypirc
echo "username = ${PYPI_USERNAME}" >> ~/.pypirc
echo "password = ${PYPI_PASSWORD}" >> ~/.pypirc
python setup.py sdist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
rm -fr build dist
docker:
docker build -t docker.pkg.github.com/$IMAGE_NAME:$DOCKER_TAG .
docker push docker.pkg.github.com/$IMAGE_NAME:$DOCKER_TAG
freeze:
pip freeze > freeze.txt
clean:
rm -rf docs/build .tox .pytest_cache build rawsec_cli.egg-info dist coverage_html_report dumpSyntax .coverage .coverage.* .rnd .mypy_cache
help:
@echo "make install Install requirements."
@echo "make install-dev Install dev requirements."
@echo "make full-install Install requirements + dev requirements + docs requirements."
@echo "make lint Run Lint."
@echo "make docstr Run docstr report."
@echo "make tox Run Unit test tox."
@echo "make test Run Unit test."
@echo "make coverage Show coverage report."
@echo "make html Generate docs."
@echo "make deploy Deploy package on pypi."
@echo "make fake-deploy Test Deploy."
@echo "make docker Build docker and pushblish on github registry."
@echo "make freeze Run pip freeze."
@echo "make clean Clean Your project.Delete useless file."
@echo "make help Show this help message."