-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 793 Bytes
/
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
.PHONY:
.SILENT:
.DEFAULT_GOAL := run
gdraft:
git add .
git commit -m "${msg}"
git:
git add .
git commit -m "${msg}"
git push
build.unix:
go mod download && CGO_ENABLED=0 GOOS=linux go build -o ./.bin/app ./cmd/app/main.go
build.win:
go mod download && set CGO_ENABLED=0; go env -w GOARCH=amd64 GOOS=linux && go build -o ./.bin/app ./cmd/app/main.go
run: build.unix
docker-compose up --remove-orphans app -d
dev:
docker-compose up --build --remove-orphans dev -d
test.coverage:
go tool cover -func=cover.out | grep "total"
test:
go test --short -coverprofile=cover.out -v ./...
make test.coverage
lint:
golangci-lint run
migrate:
migrate -path ./schema -database 'postgres://postgres:qwerty@0.0.0.0:5436/postgres?sslmode=disable' up
swag:
swag init -g cmd/app/main.go