forked from gooddata/gooddata-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (61 loc) · 1.73 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
# (C) 2021 GoodData Corporation
# list all full paths to files and directories in CWD containing "gooddata", filter out ones ending by "client"
NO_CLIENT_GD_PROJECTS_ABS = $(filter-out %client, $(wildcard $(CURDIR)/*gooddata*))
# for each path, take only the base name of the path
NO_CLIENT_GD_PROJECTS_DIRS = $(foreach dir, $(NO_CLIENT_GD_PROJECTS_ABS), $(notdir $(dir)))
include ci_tests.mk
all:
echo "Nothing here yet."
.PHONY: dev
dev:
python3.9 -m venv .venv --upgrade-deps
.venv/bin/pip3 install -r dev-requirements.txt
.venv/bin/pre-commit install
.PHONY: lint
lint:
flake8 .
.PHONY: format
format:
black --check .
isort --check .
.PHONY: format-diff
format-diff:
black --diff .
isort --diff .
.PHONY: format-fix
format-fix:
black .
isort .
.PHONY: clients
clients: afm-client metadata-client scan-client
.PHONY: afm-client
afm-client:
./scripts/generate_client.sh gooddata-afm-client
.PHONY: metadata-client
metadata-client:
./scripts/generate_client.sh gooddata-metadata-client
.PHONY: scan-client
scan-client:
./scripts/generate_client.sh gooddata-scan-client
.PHONY: mypy
mypy:
RESULT=0; \
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C $${project} $@ || RESULT=$$?; done; \
exit $$RESULT
.PHONY: test
test:
RESULT=0; \
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C $${project} test || RESULT=$$?; done; \
exit $$RESULT
.PHONY: release
release:
if [ -z "$(VERSION)" ]; then echo "Usage: 'make release VERSION=X.Y.Z'"; false; else \
tbump $(VERSION) --no-tag --no-push ; fi
.PHONY: check-copyright
check-copyright:
./scripts/check_copyright.py FOLDER
.PHONY: docs
docs:
RESULT=0; \
for project in $(NO_CLIENT_GD_PROJECTS_DIRS); do $(MAKE) -C $${project} $@ || RESULT=$$?; done; \
exit $$RESULT