-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
92 lines (69 loc) · 2.11 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
84
85
86
87
88
89
90
91
92
guard-%:
@ if [ "${${*}}" = "" ]; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
.PHONY: install build test publish release clean
install: install-node install-python install-hooks
install-python:
poetry install
install-node:
npm ci
install-hooks: install-python
poetry run pre-commit install --install-hooks --overwrite
compile-node:
npx tsc --build tsconfig.build.json
compile: compile-node
lint-node: compile-node
npm run lint --workspace packages/cdk
lint-githubactions:
actionlint
lint-githubaction-scripts:
shellcheck .github/scripts/*.sh
lint: lint-node lint-githubactions lint-githubaction-scripts
test: compile
npm run test --workspace packages/cdk
clean:
rm -rf packages/cdk/coverage
rm -rf packages/cdk/lib
rm -rf cdk.out
deep-clean: clean
rm -rf .venv
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
check-licenses: check-licenses-node check-licenses-python
check-licenses-node:
npm run check-licenses
npm run check-licenses --workspace packages/cdk
check-licenses-python:
scripts/check_python_licenses.sh
aws-configure:
aws configure sso --region eu-west-2
aws-login:
aws sso login --sso-session sso-session
cfn-guard:
./scripts/run_cfn_guard.sh
cdk-synth:
npx cdk synth \
--quiet \
--app "npx ts-node --prefer-ts-exts packages/cdk/bin/StorageResourcesApp.ts" \
--context VERSION_NUMBER=undefined \
--context COMMIT_ID=undefined
cdk-diff: guard-service_name
npx cdk diff \
--app "npx ts-node --prefer-ts-exts packages/cdk/bin/StorageResourcesApp.ts" \
--context serviceName=$$service_name \
--context VERSION_NUMBER=$$VERSION_NUMBER \
--context COMMIT_ID=$$COMMIT_ID
cdk-watch: guard-service_name
REQUIRE_APPROVAL="$${REQUIRE_APPROVAL:-any-change}" && \
VERSION_NUMBER="$${VERSION_NUMBER:-undefined}" && \
COMMIT_ID="$${COMMIT_ID:-undefined}" && \
npx cdk deploy \
--app "npx ts-node --prefer-ts-exts packages/cdk/bin/StorageResourcesApp.ts" \
--watch \
--all \
--ci true \
--require-approval $${REQUIRE_APPROVAL} \
--context serviceName=$$service_name \
--context VERSION_NUMBER=$$VERSION_NUMBER \
--context COMMIT_ID=$$COMMIT_ID