forked from salesforce/sloop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 854 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
.PHONY:all run linux docker generate tidy protobuf cover docker-push
all:
go get ./pkg/...
go fmt ./pkg/...
go install ./pkg/...
go test -cover ./pkg/...
run:
go install ./pkg/...
$(GOPATH)/bin/sloop
linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -ldflags "-s" -installsuffix cgo -v ./pkg/...
docker:
docker build . -t sloop
docker-push: docker
docker tag sloop:latest sloopimage/sloop:latest
docker push sloopimage/sloop:latest
generate:
go generate ./pkg/...
tidy:
# Run tidy whenever go.mod is changed
go mod tidy
protobuf:
# Make sure you `brew install protobuf` first
# go get -u github.com/golang/protobuf/protoc-gen-go
protoc -I=./pkg/sloop/store/typed/ --go_out=./pkg/sloop/store/typed/ ./pkg/sloop/store/typed/schema.proto
cover:
go test ./pkg/... -coverprofile=coverage.out
go tool cover -html=coverage.out