-
Notifications
You must be signed in to change notification settings - Fork 25
/
Makefile
41 lines (30 loc) · 1.72 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
dev_setup:
go install github.com/joho/godotenv/cmd/godotenv@latest
go install github.com/air-verse/air@latest
build_server:
go build -ldflags='-X github.com/zibbp/ganymede/internal/utils.Commit=$(shell git rev-parse HEAD) -X github.com/zibbp/ganymede/internal/utils.BuildTime=$(shell date -u "+%Y-%m-%d_%H:%M:%S")' -o ganymede-api cmd/server/main.go
build_worker:
go build -ldflags='-X github.com/zibbp/ganymede/internal/utils.Commit=$(shell git rev-parse HEAD) -X github.com/zibbp/ganymede/internal/utils.BuildTime=$(shell date -u "+%Y-%m-%d_%H:%M:%S")' -o ganymede-worker cmd/worker/main.go
build_dev_server:
go build -ldflags='-X github.com/zibbp/ganymede/internal/utils.Commit=$(shell git rev-parse HEAD) -X github.com/zibbp/ganymede/internal/utils.BuildTime=$(shell date -u "+%Y-%m-%d_%H:%M:%S")' -o ./tmp/server ./cmd/server/main.go
build_dev_worker:
go build -ldflags='-X github.com/zibbp/ganymede/internal/utils.Commit=$(shell git rev-parse HEAD) -X github.com/zibbp/ganymede/internal/utils.BuildTime=$(shell date -u "+%Y-%m-%d_%H:%M:%S")' -o ./tmp/worker ./cmd/worker/main.go
dev_server:
rm -f ./tmp/server
air -c ./.server.air.toml
dev_worker:
rm -f ./tmp/worker
air -c ./.worker.air.toml
ent_generate:
go run -mod=mod entgo.io/ent/cmd/ent generate --feature sql/upsert ./ent/schema
go_update_packages:
go get -u ./... && go mod tidy
lint:
golangci-lint run
test:
go test -v ./...
river-webui:
curl -L https://github.com/riverqueue/riverui/releases/latest/download/riverui_linux_amd64.gz | gzip -d > /tmp/riverui
chmod +x /tmp/riverui
@export $(shell grep -v '^#' .env | xargs) && \
VITE_RIVER_API_BASE_URL=http://localhost:8080/api DATABASE_URL=postgres://$$DB_USER:$$DB_PASS@$$DB_HOST:$$DB_PORT/$$DB_NAME /tmp/riverui