diff --git a/CHANGELOG.md b/CHANGELOG.md index 545e830e20..6cfea225eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ file. Only WebAssembly check plugins are supported at this time. - Add `buf registry plugin commit {add-label,info,list,resolve}` to manage BSR plugin commits. - Add `buf registry plugin label {archive,info,list,unarchive}` to manage BSR plugin commits. +- Move `buf registry module update` to `buf registry module settings update`. Command + `buf registry module update` is now deprecated. ## [v1.47.2] - 2024-11-14 diff --git a/private/buf/cmd/buf/buf.go b/private/buf/cmd/buf/buf.go index 5febab7e33..f7e937e81f 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/modulesettings/modulesettingsupdate" "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/pluginsettings/pluginsettingsupdate" "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: "settings", + Short: "Manage a module's settings", + SubCommands: []*appcmd.Command{ + modulesettingsupdate.NewCommand("update", builder, ""), + }, + }, modulecreate.NewCommand("create", builder), moduleinfo.NewCommand("info", builder), moduledelete.NewCommand("delete", builder), moduledeprecate.NewCommand("deprecate", builder), + modulesettingsupdate.NewCommand("update", builder, deprecatedMessage("buf registry module settings 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: "settings", + Short: "Manage a plugin's settings", + SubCommands: []*appcmd.Command{ + pluginsettingsupdate.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/modulesettings/modulesettingsupdate/modulesettingsupdate.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/modulesettings/modulesettingsupdate/modulesettingsupdate.go index a6463a1700..8724e456c4 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go +++ b/private/buf/cmd/buf/command/registry/module/modulesettings/modulesettingsupdate/modulesettingsupdate.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package moduleupdate +package modulesettingsupdate 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/modulesettings/modulesettingsupdate/usage.gen.go similarity index 95% rename from private/buf/cmd/buf/command/registry/module/moduleupdate/usage.gen.go rename to private/buf/cmd/buf/command/registry/module/modulesettings/modulesettingsupdate/usage.gen.go index cc87ee5d95..00324b6b5a 100644 --- a/private/buf/cmd/buf/command/registry/module/moduleupdate/usage.gen.go +++ b/private/buf/cmd/buf/command/registry/module/modulesettings/modulesettingsupdate/usage.gen.go @@ -14,6 +14,6 @@ // Generated. DO NOT EDIT. -package moduleupdate +package modulesettingsupdate 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/pluginsettings/pluginsettingsupdate/pluginsettingsupdate.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/pluginsettings/pluginsettingsupdate/pluginsettingsupdate.go index 5656c1dc7b..7314e28c56 100644 --- a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/pluginupdate.go +++ b/private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate/pluginsettingsupdate.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package pluginupdate +package pluginsettingsupdate import ( "context" diff --git a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go b/private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate/usage.gen.go similarity index 95% rename from private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go rename to private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate/usage.gen.go index 23136ff2a4..e0149d3602 100644 --- a/private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go +++ b/private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate/usage.gen.go @@ -14,6 +14,6 @@ // Generated. DO NOT EDIT. -package pluginupdate +package pluginsettingsupdate import _ "github.com/bufbuild/buf/private/usage"