-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
74 lines (55 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
# Versioning
version_full ?= $(shell $(MAKE) --silent version-full)
version_small ?= $(shell $(MAKE) --silent version)
version:
@bash ./cicd/version/version.sh -g . -c
version-full:
@bash ./cicd/version/version.sh -g . -c -m
brew:
@echo "➡️ Installing Azure Functions Core Tools..."
brew tap azure/functions && brew install azure-functions-core-tools@4
@echo "➡️ Installing Syft..."
brew install syft
install:
@echo "➡️ Installing pip-tools..."
python3 -m pip install pip-tools
@echo "➡️ Syncing dependencies..."
pip-sync --pip-args "--no-deps" requirements-dev.txt
upgrade:
@echo "➡️ Upgrading pip..."
python3 -m pip install --upgrade pip setuptools wheel
@echo "➡️ Upgrading pip-tools..."
python3 -m pip install --upgrade pip-tools
@echo "➡️ Compiling app requirements..."
pip-compile \
--output-file requirements.txt \
pyproject.toml
@echo "➡️ Compiling dev requirements..."
pip-compile \
--extra dev \
--output-file requirements-dev.txt \
pyproject.toml
test:
@echo "➡️ Test generic formatter (Black)..."
python3 -m black --check .
@echo "➡️ Test import formatter (isort)..."
python3 -m isort --jobs -1 --check .
@echo "➡️ Test dependencies issues (deptry)..."
python3 -m deptry .
@echo "➡️ Test code smells (Pylint)..."
python3 -m pylint .
@echo "➡️ Test types (Pyright)..."
python3 -m pyright .
lint:
@echo "➡️ Fix with generic formatter (Black)..."
python3 -m black .
@echo "➡️ Fix with import formatter (isort)..."
python3 -m isort --jobs -1 .
dev:
VERSION=$(version_full) func start
sbom:
@echo "🔍 Generating SBOM..."
syft scan \
--source-version $(version_full) \
--output spdx-json=./sbom-reports/$(version_full).json \
.