-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (62 loc) · 2.74 KB
/
Copy pathMakefile
File metadata and controls
87 lines (62 loc) · 2.74 KB
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
.PHONY: setup dev \
dev-backend dev-web \
test test-backend test-web test-e2e \
build build-backend build-web \
lint lint-backend lint-web lint-mobile \
tidy itest-backend
# ── Setup ──────────────────────────────────────────────────────────────────────
setup:
ifeq ($(OS),Windows_NT)
powershell -ExecutionPolicy Bypass -File scripts/setup.ps1
else
bash scripts/setup.sh
endif
# ── Development ────────────────────────────────────────────────────────────────
dev:
ifeq ($(OS),Windows_NT)
powershell -ExecutionPolicy Bypass -File scripts/dev.ps1
else
bash scripts/dev.sh
endif
dev-backend:
cd backend && make watch
dev-web:
cd web && pnpm dev
# ── Testing ────────────────────────────────────────────────────────────────────
test-backend:
cd backend && go test ./...
test-web:
cd web && pnpm test:run
test-e2e:
cd web && pnpm test:e2e
test: test-backend test-web test-e2e
# ── Build ──────────────────────────────────────────────────────────────────────
build-backend:
cd backend && make build
build-web:
cd web && pnpm build
build: build-backend build-web
# ── Utilities ──────────────────────────────────────────────────────────────────
itest-backend:
cd backend && make itest
lint-backend:
cd backend && go vet ./...
lint-web:
cd web && pnpm lint
GRADLEW := $(if $(filter Windows_NT,$(OS)),gradlew.bat,./gradlew)
lint-mobile:
cd mobile && $(GRADLEW) lint
lint: lint-backend lint-web lint-mobile
tidy:
cd backend && go mod tidy
cd web && pnpm install
# ── Deploy ─────────────────────────────────────────────────────────────────────
# Rebases `production` onto `main` and force-pushes (with lease) to trigger a
# deploy. Aborts if the working tree is dirty or the rebase conflicts; prompts
# for confirmation before pushing unless CONFIRM=yes is set.
deploy-prod:
ifeq ($(OS),Windows_NT)
pwsh -ExecutionPolicy Bypass -File scripts/deploy-prod.ps1
else
bash scripts/deploy-prod.sh
endif