script/genproto.sh: Refactor to be explicit about versions.

Refactoring script/genproto.sh around state-of-the-art techniques of
managing tooling in go:
  - https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
  - uses https://github.com/myitcv/gobin instead of customly created gopath.proto dir
  - caches tools between executions
  - guaratees hermetics runs (it was not guaranteed for protoc_grpc_gateway that used latest)

The change is no-op for the generated code.

The commit reveals a few 'worring things':
  1  We depend on : github.com/grpc-ecosystem/grpc-gateway/@v/v1.4.1/protoc-gen-grpc-gateway
  2. And also     : github.com/grpc-ecosystem/grpc-gateway/@v/v1.15.0/protoc-gen-swagger/protoc-gen-swagger
  3. And on extremely old: github.com/gogo/protobuf@v1.0.0 protoc-gen-gofast that is out of sync with the library linked to binaries: github.com/gogo/protobuf@v1.2.1
This commit is contained in:
Piotr Tabor
2020-10-08 19:48:35 +02:00
parent 2c66612e0e
commit dfdda47bd8
6 changed files with 369 additions and 87 deletions

2
.gitignore vendored
View File

@@ -19,5 +19,5 @@ hack/tls-setup/certs
/vendor
/tests/e2e/default.proxy
*.tmp
*.bak
.gobincache/