From 1d8accaffd15a166149c5527dd79de89ac43f8c1 Mon Sep 17 00:00:00 2001 From: Richard Hua Date: Thu, 11 Apr 2024 11:31:20 -0700 Subject: [PATCH] Hack to only install uber mockgen if needed --- dev/up | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/up b/dev/up index 55222acd..f3d02ffd 100755 --- a/dev/up +++ b/dev/up @@ -8,7 +8,7 @@ if ! which golangci-lint &>/dev/null; then brew install golangci-lint; fi if ! which shellcheck &>/dev/null; then brew install shellcheck; fi if ! which protoc &>/dev/null; then brew install protobuf; fi if ! which protoc-gen-go &>/dev/null; then go install google.golang.org/protobuf/cmd/protoc-gen-go@latest; fi -go install go.uber.org/mock/mockgen@latest +if [ `mockgen --version` != "v0.4.0" ]; then go install go.uber.org/mock/mockgen@v0.4.0; fi if ! which protolint &>/dev/null; then go install github.com/yoheimuta/protolint/cmd/protolint@latest; fi dev/generate diff --git a/go.mod b/go.mod index c93b259b..83044d23 100644 --- a/go.mod +++ b/go.mod @@ -75,7 +75,7 @@ require ( github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.0.0 // indirect - github.com/golang/mock v1.6.0 + github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/gopacket v1.1.19 // indirect