056afec140
This patch updates the script and Dockerfile to prevent issues when using go modules. The first change is to use a plain `git clone` instead of `go get -d` to download the source. While (like "pre go-modules") `go get -d` won't *build* the binaries when go modules are used, it *will* use go modules to download the package (and dependencies); as a result: - no git repository will be cloned in gopath - go modules will be downloaded for "master" (not the version that we specify to build) Note: Once we update to Go 1.16, this script could be updated to use `go install <repo>@version` The second change is an update to the `update-generated-files` script to detect the correct version of google/protobuf to use from the `go.mod`'s `replace` rule, to make sure we generate (and verify) using the correct version. The Dockerfile was also updated to update the default versions specified in the PROTOBUF_VERSION and GOGO_VERSION build-args (although not strictly necessary). Regenerating the files with this version resulted in a minor formatting change. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
generate.go | ||
stack.go | ||
stack.pb.go | ||
stack.proto |