aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-12-04 14:31:20 -0800
committerEric Biggers <ebiggers@google.com>2018-12-04 14:31:20 -0800
commit9475b3e930768edb05ae385620580dbf31db14a4 (patch)
treea2d5b86aa7c23243580192e5b68dfec46917c5ae
parent15af139f45208bc8bf1696629c7e8a5dcc2140ce (diff)
Makefile: use a specific protoc-gen-go version
'make gen' no longer works because it uses the git version of protoc-gen-go, which is no longer compatible with the latest released version of github.com/golang/protobuf/proto, which we're using. Freeze the protoc-gen-go version so that it keeps working.
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 29aa58b..61760dc 100644
--- a/Makefile
+++ b/Makefile
@@ -171,7 +171,9 @@ $(BIN)/golint:
GO111MODULE=off go get github.com/golang/lint/golint
GO111MODULE=off go build -o $@ github.com/golang/lint/golint
$(BIN)/protoc-gen-go:
- GO111MODULE=off go get github.com/golang/protobuf/protoc-gen-go
+ GO111MODULE=off go get -d github.com/golang/protobuf/protoc-gen-go
+ git -C "$(shell go env GOPATH)/src/github.com/golang/protobuf" checkout v1.2.0
+ go install github.com/golang/protobuf/protoc-gen-go
GO111MODULE=off go build -o $@ github.com/golang/protobuf/protoc-gen-go
$(BIN)/goimports:
GO111MODULE=off go get golang.org/x/tools/cmd/goimports