diff --git a/private/buf/cmd/buf/buf.go b/private/buf/cmd/buf/buf.go index 5febab7e33..aa9f893718 100644 --- a/private/buf/cmd/buf/buf.go +++ b/private/buf/cmd/buf/buf.go @@ -78,8 +78,8 @@ import ( "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelinfo" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabellist" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelunarchive" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleundeprecate" - "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleupdate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationcreate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationdelete" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationinfo" @@ -95,7 +95,7 @@ import ( "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginlabel/pluginlabelinfo" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginlabel/pluginlabellist" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginlabel/pluginlabelunarchive" - registrypluginupdate "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginupdate" + "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrycc" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin" "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout" @@ -268,12 +268,19 @@ func NewRootCommand(name string) *appcmd.Command { modulelabelunarchive.NewCommand("unarchive", builder, ""), }, }, + { + Use: "setting", + Short: "Manage a module's settings", + SubCommands: []*appcmd.Command{ + modulesettingupdate.NewCommand("update", builder, ""), + }, + }, modulecreate.NewCommand("create", builder), moduleinfo.NewCommand("info", builder), moduledelete.NewCommand("delete", builder), moduledeprecate.NewCommand("deprecate", builder), + modulesettingupdate.NewCommand("update", builder, deprecatedMessage("buf registry module setting update", "buf registry update")), moduleundeprecate.NewCommand("undeprecate", builder), - moduleupdate.NewCommand("update", builder), }, }, { @@ -300,10 +307,16 @@ func NewRootCommand(name string) *appcmd.Command { pluginlabelunarchive.NewCommand("unarchive", builder, ""), }, }, + { + Use: "setting", + Short: "Manage a plugin's settings", + SubCommands: []*appcmd.Command{ + pluginsettingupdate.NewCommand("update", builder), + }, + }, plugincreate.NewCommand("create", builder), plugininfo.NewCommand("info", builder), plugindelete.NewCommand("delete", builder), - registrypluginupdate.NewCommand("update", builder), }, }, }, diff --git a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go b/private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate/modulesettingupdate.go similarity index 93% rename from private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go rename to private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate/modulesettingupdate.go index a6463a1700..5a27008570 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go +++ b/private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate/modulesettingupdate.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package moduleupdate +package modulesettingupdate import ( "context" @@ -37,12 +37,17 @@ const ( ) // NewCommand returns a new Command -func NewCommand(name string, builder appext.SubCommandBuilder) *appcmd.Command { +func NewCommand( + name string, + builder appext.SubCommandBuilder, + deprecated string, +) *appcmd.Command { flags := newFlags() return &appcmd.Command{ - Use: name + " ", - Short: "Update BSR module settings", - Args: appcmd.ExactArgs(1), + Use: name + " ", + Short: "Update BSR module settings", + Args: appcmd.ExactArgs(1), + Deprecated: deprecated, Run: builder.NewRunFunc( func(ctx context.Context, container appext.Container) error { return run(ctx, container, flags) diff --git a/private/buf/cmd/buf/command/registry/module/moduleupdate/usage.gen.go b/private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate/usage.gen.go similarity index 96% rename from private/buf/cmd/buf/command/registry/module/moduleupdate/usage.gen.go rename to private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate/usage.gen.go index cc87ee5d95..17819f0749 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleupdate/usage.gen.go +++ b/private/buf/cmd/buf/command/registry/module/modulesetting/modulesettingupdate/usage.gen.go @@ -14,6 +14,6 @@ // Generated. DO NOT EDIT. -package moduleupdate +package modulesettingupdate import _ "github.com/bufbuild/buf/private/usage" diff --git a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/pluginupdate.go b/private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate/pluginsettingupdate.go similarity index 99% rename from private/buf/cmd/buf/command/registry/plugin/pluginupdate/pluginupdate.go rename to private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate/pluginsettingupdate.go index 5656c1dc7b..a34d68de1b 100644 --- a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/pluginupdate.go +++ b/private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate/pluginsettingupdate.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package pluginupdate +package pluginsettingupdate import ( "context" diff --git a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go b/private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate/usage.gen.go similarity index 96% rename from private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go rename to private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate/usage.gen.go index 23136ff2a4..2997645f41 100644 --- a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go +++ b/private/buf/cmd/buf/command/registry/plugin/pluginsetting/pluginsettingupdate/usage.gen.go @@ -14,6 +14,6 @@ // Generated. DO NOT EDIT. -package pluginupdate +package pluginsettingupdate import _ "github.com/bufbuild/buf/private/usage"