#!/bin/sh | |
# Copyright 2018 Google Inc. All Rights Reserved. | |
version="$(go list -m -f '{{.Version}}' google.golang.org/protobuf)" | |
go install "google.golang.org/protobuf/cmd/protoc-gen-go@${version}" | |
version="$(go list -m -f '{{.Version}}' google.golang.org/grpc/cmd/protoc-gen-go-grpc)" | |
if [ -z "${version}" ]; then | |
go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest" | |
else | |
go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc@${version}" | |
fi |