-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
83 lines (70 loc) · 1.78 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Made by EliuX for OPA-Flask.
.PHONY: build
build: install-dev lint coverage
.PHONY: start-opa
start-opa:
nohup opa run -s -w examples &
.PHONY: stop-opa, kill
stop-opa:
kill $(ps | grep opa | awk '{print $1}')
.PHONY: demo
demo: start-opa
export FLASK_ENV=development
export FLASK_APP=examples/app.py
flask run
.PHONY: test
test:
pytest -v
.PHONY: coverage
coverage:
coverage erase
coverage run -m pytest -v
.PHONY: lint
lint:
flake8 flask_opa.py --count
.PHONY: install
install:
pip3 install -e .
.PHONY: install-dev
install-dev: install
pip3 install --upgrade pytest
pip3 install --upgrade coverage
pip3 install --upgrade codecov
pip3 install --upgrade flake8
pip3 install --upgrade responses
pip3 install --upgrade python-semantic-release
.PHONY: semver-test
semver-test:
semantic-release version --noop
.PHONY: push
push:
./setup.py sdist bdist_wheel
pip3 install --user --upgrade twine
twine upload --repository-url https://pypi.org/legacy/ dist/*
.PHONY: push-test
push-test:
./setup.py sdist bdist_wheel
pip3 install --user --upgrade twine
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: help
help:
@echo "make start-opa"
@echo " starts the opa server"
@echo "make stop-opa"
@echo " stops the opa server"
@echo "make demo"
@echo " runs the demo project"
@echo "make test"
@echo " run tests"
@echo "make coverage"
@echo " runs the tests and coverage"
@echo "make lint"
@echo " run lints of interest for the code"
@echo "make install"
@echo " install all requirements"
@echo "make install-dev"
@echo " install all requirements for development"
@echo "make build"
@echo " runs lints, tests and coverage"
@echo "semver-test"
@echo " Checks whether the SEMVER update can be done"