-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
37 lines (28 loc) · 946 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
CHANGES:=$(shell git status --porcelain)
quality: lint test bench
lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run --sort-results
test:
# temporarily skip edgeql-go tests until a gel-go version is published
go test -v -count=1 -race -bench=$$^ -timeout=20m $(shell go list ./... | grep -v edgeql-go)
bench:
go test -run=^$$ -bench=. -benchmem -timeout=10m ./...
format:
gofmt -s -w .
errors:
type edb || (\
echo "the edb command must be in your path " && \
echo "see https://www.edgedb.com/docs/guides/contributing/code#building-locally" && \
exit 1 \
)
edb gen-errors-json --client | \
go run internal/cmd/generrdefinition/main.go > internal/client/errors_gen.go
edb gen-errors-json --client | \
go run internal/cmd/generrexport/main.go > errors_gen.go
make format
gen:
go generate ./...
gendocs:
go run internal/cmd/gendocs/*.go
gendocs-lint:
go run internal/cmd/gendocs/*.go --lint