-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
46 lines (35 loc) · 1.01 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
setup-peg:
go get github.com/mna/[email protected]
peg:
pigeon ./internal/parser/ast/grammar.peg > ./internal/parser/ast/grammar.go
dev:
RESTQL_PORT=9000 RESTQL_HEALTH_PORT=9001 RESTQL_PPROF_PORT=9002 go run -race -ldflags="-X github.com/b2wdigital/restQL-golang/v6/cmd.build=$(RESTQL_BUILD)" main.go
unit:
go test -race -count=1 ./internal/...
go test -race -count=1 ./pkg/...
staticcheck ./...
e2e:
make e2e-up &
sleep 10
make e2e-run && fuser -k 9000/tcp && exit 0 || fuser -k 9000/tcp && exit 1
e2e-up:
RESTQL_CONFIG=./test/e2e/restql.yml make dev
e2e-run:
go test -race -count=1 ./test/e2e/...
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/restQL -ldflags="-s -w -X github.com/b2wdigital/restQL-golang/v6/cmd.build=$(RESTQL_BUILD) -extldflags -static" -tags netgo main.go
# Modules support
deps-reset:
git checkout -- go.mod
go mod tidy
go mod vendor
tidy:
go mod tidy
go mod vendor
deps-upgrade:
go get -u -t -d -v ./...
go mod tidy
go mod vendor
deps-cleancache:
go clean -modcache
#