forked from Unbot2313/go-streaming-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (29 loc) · 873 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (29 loc) · 873 Bytes
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
.PHONY: build run worker test test-coverage lint swagger docker-build docker-up migrate-diff migrate-apply migrate-status
build:
go build -o bin/server main.go
go build -o bin/worker cmd/rabbitmq/consumer/main.go
run:
go run main.go
worker:
go run cmd/rabbitmq/consumer/main.go
test:
go test ./... -race -v
test-coverage:
go test ./... -race -coverprofile=coverage.out
go tool cover -func=coverage.out
lint:
go vet ./...
swagger:
swag init
docker-build:
docker compose build
docker-up:
docker compose up --build
migrate-diff:
atlas migrate diff $(name) --env gorm
migrate-apply:
atlas migrate apply --env gorm --url "$(DATABASE_URL)"
migrate-baseline:
atlas migrate apply --baseline "$(version)" --env gorm --url "$(DATABASE_URL)"
migrate-status:
atlas migrate status --env gorm --url "$(DATABASE_URL)"