-
Notifications
You must be signed in to change notification settings - Fork 207
/
Makefile
84 lines (64 loc) · 1.58 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
#!/bin/bash
# Libraries
TSC := node node_modules/.bin/tsc
ESLINT := node node_modules/.bin/eslint
CDK := npx cdk
COPY := node node_modules/.bin/copyfiles
THIS_FILE := $(lastword $(MAKEFILE_LIST))
# Dependecies
HOMEBREW_LIBS := nvm typescript argocd
deps:
npm install
lint:
$(ESLINT) . --ext .js,.jsx,.ts,.tsx
build:
rm -rf dist
@$(MAKE) -f $(THIS_FILE) compile
compile:
$(TSC)
@$(MAKE) -f $(THIS_FILE) copyfiles
copyfiles:
$(COPY) "lib/**/*.yaml" "lib/**/*.ytpl" "dist/" -u 1 -V -E
list:
$(DEPS)
$(CDK) list
markdown-link-check:
find docs -name "*.md" | xargs -n 1 markdown-link-check -q -c .github/workflows/linkcheck.json
run-test:
npm test
synth:
$(DEPS)
$(CDK) synth
bootstrap-cdk:
aws cloudformation describe-stacks \
--stack-name CDKToolkit \
--region ${AWS_REGION} || \
CDK_NEW_BOOTSTRAP=1 $(CDK) bootstrap \
aws://$(aws sts get-caller-identity --output text --query Account --region ${AWS_REGION})/${AWS_REGION}
deploy-all:
$(DEPS)
$(CDK) deploy --verbose --all --require-approval never
destroy-all:
$(CDK) destroy --verbose --all --force
mkdocs:
npx typedoc --out docs/api lib/index.ts
mkdocs serve
push-mkdocs:
npx typedoc --out docs/api lib/index.ts
mkdocs gh-deploy
bootstrap:
@for LIB in $(HOMEBREW_LIBS) ; do \
LIB=$$LIB make check-lib ; \
done
check-lib:
ifeq ($(shell brew ls --versions $(LIB)),)
@echo Installing $(LIB) via Hombrew
@brew install $(LIB)
else
@echo $(LIB) is already installed, skipping.
endif
clean:
rm -rf node_modules && rm -f package-lock.json
updates:
npm install -g npm-check-updates
npx npm-check-updates -u