diff --git a/build/tools/tools.go b/build/tools/tools.go index 7e1cc745..aa11420d 100644 --- a/build/tools/tools.go +++ b/build/tools/tools.go @@ -39,6 +39,7 @@ const ( Osmosis Name = "osmosis" Hermes Name = "hermes" CoredV303 Name = "cored-v3.0.3" + Mockgen = "mockgen" Buf Name = "buf" Protoc Name = "protoc" ProtocGenDoc Name = "protoc-gen-doc" @@ -390,6 +391,13 @@ var tools = []Tool{ Package: "github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking", }, + // https://github.com/uber-go/mock/releases + GoPackageTool{ + Name: Mockgen, + Version: "v0.4.0", + Package: "go.uber.org/mock/mockgen", + }, + // https://rust-lang.github.io/rustup/installation/other.html BinaryTool{ Name: RustUpInit, @@ -1077,6 +1085,11 @@ func EnsureProtocGenBufBreaking(ctx context.Context, deps types.DepsFunc) error return Ensure(ctx, ProtocGenBufBreaking, TargetPlatformLocal) } +// EnsureMockgen ensures that mockgen is available. +func EnsureMockgen(ctx context.Context, deps types.DepsFunc) error { + return Ensure(ctx, Mockgen, TargetPlatformLocal) +} + func linkTool(tool Tool, platform TargetPlatform, binaries ...string) error { for _, dst := range binaries { relink, err := shouldRelink(tool, platform, dst)