2024-11-26 04:34:01 -06:00
|
|
|
# You must use the current protoc-gen-go
|
|
|
|
#
|
|
|
|
# go-clone --go-src google.golang.org/protobuf
|
|
|
|
# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go
|
|
|
|
# go install
|
|
|
|
|
|
|
|
|
2024-11-26 05:34:26 -06:00
|
|
|
all: refs.pb.go godep.pb.go vet
|
2024-11-26 04:34:01 -06:00
|
|
|
|
|
|
|
vet: lint
|
|
|
|
GO111MODULE=off go vet
|
|
|
|
|
|
|
|
lint:
|
|
|
|
# -buf lint refs.proto # todo: figure out where buf comes from again
|
|
|
|
|
|
|
|
# autofixes your import headers in your golang files
|
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.pb.go
|
|
|
|
-rm -f go.*
|
|
|
|
make -C example clean
|
|
|
|
|
|
|
|
refs.pb.go: refs.proto
|
|
|
|
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
--go_opt=Mrefs.proto=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
refs.proto
|
2024-11-26 05:34:26 -06:00
|
|
|
|
|
|
|
godep.pb.go: godep.proto
|
|
|
|
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
--go_opt=Mgodep.proto=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
godep.proto
|