forked from aws-quickstart/cdk-eks-blueprints
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (57 loc) · 1.28 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
#!/bin/bash
# Libraries
TSC := node node_modules/.bin/tsc
ESLINT := node node_modules/.bin/eslint
CDK := npx cdk
COPY := node node_modules/.bin/copyfiles
# Dependecies
HOMEBREW_LIBS := nvm typescript argocd
deps:
npm install
lint:
$(ESLINT) . --ext .js,.jsx,.ts,.tsx
build:
rm -rf dist && $(TSC)
$(COPY) lib/**/*.yaml dist/ -u 1
compile:
$(TSC)
$(COPY) lib/**/*.yaml dist/ -u 1
list:
$(DEPS)
$(CDK) list
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:
mkdocs serve
push-mkdocs:
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