-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
104 lines (70 loc) · 2.35 KB
/
Copy pathMakefile
File metadata and controls
104 lines (70 loc) · 2.35 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
LANG=en_US.UTF-8
SHELL=/bin/bash
.SHELLFLAGS=--norc --noprofile -e -u -o pipefail -c
# Include the main .env file
include config/state.env
# Construct the variable name based on STATE
CURRENT_STATE_FILE = config/$(STATE).env
# Include the appropriate .env file (e.g., dev.env or prod.env)
include $(CURRENT_STATE_FILE)
# Include the additional .env file
include config/shared.env
mign :
supabase migration new $(name)
testdb:
go test ./db/... -v
testdate:
go test ./pkg/dateutils/... -v
testapi:
go test ./api/... -v --race
seed_storage:
devkit seed storage -f seeds/assets -i seeds/icons
deploy:
docker compose build && make dtag v=$(v) && make dpush v=$(v)
seed_accounts:
devkit seed accounts_schema --file-path seeds/schemas/accounts.xlsx -e
seed_public:
devkit seed public --file-path seeds/schemas/public.xlsx -e
seed_properties:
devkit seed properties_schema --file-path seeds/schemas/properties.xlsx -e
seed_tenants:
devkit seed tenants_schema --file-path seeds/schemas/tenant.xlsx -e
seed_tenants_accounts:
devkit seed accounts_schema --file-path seeds/schemas/tenant_accounts.xlsx -e
seed_super_user:
devkit seed super-user -e admin@devkit.com -n "super admin user"
supabase_reset:
supabase db reset
rdbr:
supabase db reset --linked
rdbrr:
make rdbr seed_super_user seed_accounts seed_storage seed_public seed_tenants seed_tenants_accounts
SCHEMA_FILE := weaviate_schema.json
CLASS_NAME := $(shell jq -r '.class' $(SCHEMA_FILE))
.PHONY: init_weaviate_schema
init_weaviate_schema:
curl -s -X POST http://localhost:8080/v1/schema \
-H "Content-Type: application/json" \
--data-binary @$(SCHEMA_FILE)
refresh_vector_db:
curl -X DELETE http://localhost:8080/v1/schema/CommandPallete && make init_weaviate_schema
rdb:
make supabase_reset refresh_vector_db seed_super_user seed_accounts seed_storage seed_public seed_tenants seed_tenants_accounts
run:
go run main.go
buf_push:
cd proto && buf push
dtag:
docker tag devkit_api exploremelon/abc_portfolio:${v}
dpush:
docker push exploremelon/abc_portfolio:${v}
buf:
rm -rf proto_gen/devkit/v1/*.pb.go && cd proto && buf lint && buf generate
sqlc:
rm -rf db/*.sql.go && sqlc generate
gen:
buf generate && sqlc generate
mock:
mockgen -package mockdb -destination db/mock/store.go github.com/darwishdev/devkit-api/db Store
test:
make mock && go test ./... -v --cover