-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
62 lines (45 loc) · 1.35 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
.PHONY: help
include .env
export
help:
@echo "Sorry, can't help you"
run:
@echo "No 'run' here. Try switching to a subfolder like 'cms' or 'backend' and doing 'make run' there."
init:
docker compose up -d --wait
cd ./cms && make init
diff:
@if [ -z "${name}" ]; then echo "Add a name with make diff name=migration_name_here"; exit 1; fi
./scripts/db_diff.sh $(name)
cd ./backend && make ./sqlc/.generated
db.init:
./scripts/db_manage.sh
migrate.up:
cd ./migrations && goose postgres "postgres://${PGUSER}:${PGPASSWORD}@localhost:5432/${LOCALDB}?sslmode=disable" up
migrate.down:
cd ./migrations && goose postgres "postgres://${PGUSER}:${PGPASSWORD}@localhost:5432/${LOCALDB}?sslmode=disable" down
migrate.status:
cd ./migrations && goose postgres "postgres://${PGUSER}:${PGPASSWORD}@localhost:5432/${LOCALDB}?sslmode=disable" status
sync.staging:
cd ./scripts/staging-sync/ && ./copy.sh
tests.setup:
./scripts/tests-setup.sh
# Must be run in order to rebuild the docker images
tests.build:
./scripts/tests-rebuild.sh
tests.rebuild:
make tests.build && make tests.setup
tests.run:
./scripts/tests-run.sh
infra.dev:
cd $(INFRA_PATH_DEV) \
&& terragrunt init \
&& terragrunt apply
infra.prod:
cd $(INFRA_PATH_PROD) \
&& terragrunt init \
&& terragrunt apply
infra.sta:
cd $(INFRA_PATH_STA) \
&& terragrunt init \
&& terragrunt apply