-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (63 loc) · 1.72 KB
/
Makefile
File metadata and controls
86 lines (63 loc) · 1.72 KB
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
84
85
86
PROJECT = authark
COVFILE ?= .coverage
TESTS ?= tests/
PART ?= patch
clean:
find . -name '__pycache__' -exec rm -fr {} +
rm -rf ./.cache .mypy_cache ./schema/.mypy_cache .coverage
test:
pytest
mypy:
mypy $(PROJECT)
mypy-application:
mypy $(PROJECT)/application
coverage-application:
export COVERAGE_FILE=$(COVFILE); \
pytest --cov-branch --cov=$(PROJECT)/application tests/application/ \
--cov-report term-missing -x -s -W ignore::DeprecationWarning \
-o cache_dir=/tmp/$(PROJECT)/cache
coverage:
export COVERAGE_FILE=$(COVFILE); pytest --cov-branch \
--cov=$(PROJECT) $(TESTS) --cov-report term-missing -x -s -vv \
-W ignore::DeprecationWarning -o cache_dir=/tmp/$(PROJECT)/cache
update-requirements:
pip-review --auto
pip freeze > requirements.txt
serve:
python -m $(PROJECT) serve
console:
export echo $$(cat /etc/opt/authark/authark.env | xargs) && \
python -m $(PROJECT) console
push:
git push origin HEAD && git push --tags
version:
bump2version $(PART) $(PROJECT)/__init__.py --tag --commit
uninstall-all:
pip freeze | xargs pip uninstall -y
install-all:
pip install -r requirements.txt
upgrade-all:
pip-review --local --auto
update:
git clean -xdf
git reset --hard
git checkout master
git pull --depth=1
git checkout `git describe --tags`
deploy:
ansible-playbook -c local -i localhost, setup/deploy.yml
prepare:
@echo "Not Found Command"
restart:
systemctl daemon-reload && systemctl restart $(PROJECT).target \
&& journalctl -f
status:
systemctl status '$(PROJECT)*' --all
local:
./setup/local.sh
gitmessage:
touch .gitmessage
echo "\n# commit message\n.gitmessage" >> .gitignore
git config commit.template .gitmessage
activate:
echo "set -a; source /etc/opt/authark/authark.env; set +a"