-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (45 loc) · 1.15 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
.DEFAULT_GOAL := all
APPS := $(shell find apps -maxdepth 1 -mindepth 1 -type d | sort)
NPROC := $$(nproc)
.PHONY: all
all:
@$(MAKE) -j$(NPROC) $(APPS)
node_modules:
bun install
.PHONY: upgrade
upgrade:
bun x ncu -u
bun install
.PHONY: apps/%
apps/%: node_modules clean
bun run apps/$(@F)/app.ts
.PHONY: clean
clean:
find dist -type f \! \( -name '.argocd-source-*.yaml' -o -name 'sealedsecret.*.yaml' \) -delete
find dist -type d -empty -delete
.PHONY: clean-full
clean-full: clean
rm -rf apps/**/*.js apps/**/*.d.ts
rm -rf lib/*.js lib/*.d.ts lib/**/*.js lib/**/*.d.ts
rm -rf imports/*.js imports/*.d.ts
.PHONY: fmt
fmt: node_modules
bun x prettier --check --write "**/*.ts"
.PHONY: format
format: fmt
.PHONY: lint
lint: node_modules
bun x eslint --fix "**/*.ts"
.PHONY: test
test: node_modules
bun x jest
.PHONY: check
check: fmt lint test
.PHONY: imports
imports:
$(eval VERSION=$(shell kubectl get node | tail -n1 | awk '{ print $$NF }' | sed -e 's/\+.*$$//' -e 's/[0-9]$$/0/' -e 's/^v//'))
cdk8s import k8s@$(VERSION)
bash -c 'cdk8s import <(kubectl get crd -ojson)'
.PHONY: schemas
schemas:
bun x json2ts -i schemas/ -o imports/helm-values/