-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (52 loc) · 1.66 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
help:
@echo "Command Description"
@echo ""
@echo "test runs tests"
@echo "vtest runs tests with increased verbosity"
@echo "cov-run runs coverage"
@echo "cov-report shows coverage report without 100% covered files"
@echo "cov-html generates html coverage report without 100% covered files"
@echo "latest-version shows the latest version of the project"
@echo "beautify formats the code using different rules"
@echo "install installs the workflow for development"
@echo "prepare_plist removes all env variables not allowed for export and updates with meta information"
@echo "build prepares info.plist and creates a workflow file (keepassxc.alfredworkflow) from the source code"
test:
@PYTHONPATH=$(PWD)/src pytest -s $(path)
vtest:
@PYTHONPATH=$(PWD)/src pytest -s -vv $(path)
cov-run:
@PYTHONPATH=$(PWD)/src coverage run --source=src -m pytest -q
cov-report: cov-run
@coverage report --skip-covered
cov-html: cov-run
@coverage html --skip-covered
latest-version:
@git fetch && git describe --tags --abbrev=0
beautify:
autoflake \
-r \
--in-place \
--remove-all-unused-imports \
--ignore-init-module-imports \
--exclude=git \
-v \
src tests && \
black \
--line-length 120 \
--exclude __pycache__ \
src tests && \
isort \
-m 3 \
--line-length=79 \
--trailing-comma \
src tests
install:
@python scripts/install.py --source=$(PWD)/src
prepare_plist:
@python scripts/prepare_plist.py \
--source=$(PWD)/src \
--version=$(version) \
--bundle_id=com.lxbrvr.keepassxcalfred
build: test
@python scripts/build.py --source=$(PWD)/src --version=$(version)