-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 1.97 KB
/
Makefile
File metadata and controls
33 lines (26 loc) · 1.97 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
.PHONY: setup dev up down logs pr-meta-check pr-open
# ── Setup (run once after cloning) ────────────────────────────────────────────
setup:
@[ -f services/api/.env ] || cp services/api/.env.example services/api/.env && echo "created services/api/.env"
@[ -f apps/extension/.env ] || cp apps/extension/.env.example apps/extension/.env && echo "created apps/extension/.env"
@[ -f apps/dashboard/.env ] || cp apps/dashboard/.env.example apps/dashboard/.env && echo "created apps/dashboard/.env"
@git config core.hooksPath infra/githooks
# ── Dev (setup + build + up) ───────────────────────────────────────────────────
dev: setup
docker compose up --build
# ── Docker Compose ────────────────────────────────────────────────────────────
up:
docker compose up --build -d
down:
docker compose down
logs:
docker compose logs -f
# ── PR preflight ──────────────────────────────────────────────────────────────
pr-meta-check:
@test -n "$(TITLE)" || (echo "TITLE is required"; exit 2)
@test -n "$(BODY_FILE)" || (echo "BODY_FILE is required"; exit 2)
@./infra/scripts/pr-metadata-check.sh --title "$(TITLE)" --body-file "$(BODY_FILE)" --base "$(or $(BASE),develop)" $(if $(HEAD),--head "$(HEAD)",)
pr-open:
@test -n "$(TITLE)" || (echo "TITLE is required"; exit 2)
@test -n "$(BODY_FILE)" || (echo "BODY_FILE is required"; exit 2)
@./infra/scripts/pr-open.sh --title "$(TITLE)" --body-file "$(BODY_FILE)" --base "$(or $(BASE),develop)" $(if $(HEAD),--head "$(HEAD)",) $(if $(filter 1,$(DRAFT)),--draft,) $(if $(filter 1,$(AUTO_READY)),--auto-ready,)