Skip to content

Commit 33d2db4

Browse files
authored
Move registry update commands under settings (#3528)
1 parent 94679e3 commit 33d2db4

File tree

6 files changed

+32
-12
lines changed

6 files changed

+32
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
file. Only WebAssembly check plugins are supported at this time.
1313
- Add `buf registry plugin commit {add-label,info,list,resolve}` to manage BSR plugin commits.
1414
- Add `buf registry plugin label {archive,info,list,unarchive}` to manage BSR plugin commits.
15+
- Move `buf registry module update` to `buf registry module settings update`. Command
16+
`buf registry module update` is now deprecated.
1517

1618
## [v1.47.2] - 2024-11-14
1719

private/buf/cmd/buf/buf.go

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ import (
7878
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelinfo"
7979
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabellist"
8080
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulelabel/modulelabelunarchive"
81+
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/modulesettings/modulesettingsupdate"
8182
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleundeprecate"
82-
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/module/moduleupdate"
8383
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationcreate"
8484
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationdelete"
8585
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/organization/organizationinfo"
@@ -95,7 +95,7 @@ import (
9595
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginlabel/pluginlabelinfo"
9696
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginlabel/pluginlabellist"
9797
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginlabel/pluginlabelunarchive"
98-
registrypluginupdate "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginupdate"
98+
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate"
9999
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrycc"
100100
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin"
101101
"github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout"
@@ -268,12 +268,19 @@ func NewRootCommand(name string) *appcmd.Command {
268268
modulelabelunarchive.NewCommand("unarchive", builder, ""),
269269
},
270270
},
271+
{
272+
Use: "settings",
273+
Short: "Manage a module's settings",
274+
SubCommands: []*appcmd.Command{
275+
modulesettingsupdate.NewCommand("update", builder, ""),
276+
},
277+
},
271278
modulecreate.NewCommand("create", builder),
272279
moduleinfo.NewCommand("info", builder),
273280
moduledelete.NewCommand("delete", builder),
274281
moduledeprecate.NewCommand("deprecate", builder),
282+
modulesettingsupdate.NewCommand("update", builder, deprecatedMessage("buf registry module settings update", "buf registry update")),
275283
moduleundeprecate.NewCommand("undeprecate", builder),
276-
moduleupdate.NewCommand("update", builder),
277284
},
278285
},
279286
{
@@ -300,10 +307,16 @@ func NewRootCommand(name string) *appcmd.Command {
300307
pluginlabelunarchive.NewCommand("unarchive", builder, ""),
301308
},
302309
},
310+
{
311+
Use: "settings",
312+
Short: "Manage a plugin's settings",
313+
SubCommands: []*appcmd.Command{
314+
pluginsettingsupdate.NewCommand("update", builder),
315+
},
316+
},
303317
plugincreate.NewCommand("create", builder),
304318
plugininfo.NewCommand("info", builder),
305319
plugindelete.NewCommand("delete", builder),
306-
registrypluginupdate.NewCommand("update", builder),
307320
},
308321
},
309322
},

private/buf/cmd/buf/command/registry/module/moduleupdate/moduleupdate.go renamed to private/buf/cmd/buf/command/registry/module/modulesettings/modulesettingsupdate/modulesettingsupdate.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package moduleupdate
15+
package modulesettingsupdate
1616

1717
import (
1818
"context"
@@ -37,12 +37,17 @@ const (
3737
)
3838

3939
// NewCommand returns a new Command
40-
func NewCommand(name string, builder appext.SubCommandBuilder) *appcmd.Command {
40+
func NewCommand(
41+
name string,
42+
builder appext.SubCommandBuilder,
43+
deprecated string,
44+
) *appcmd.Command {
4145
flags := newFlags()
4246
return &appcmd.Command{
43-
Use: name + " <remote/owner/module>",
44-
Short: "Update BSR module settings",
45-
Args: appcmd.ExactArgs(1),
47+
Use: name + " <remote/owner/module>",
48+
Short: "Update BSR module settings",
49+
Args: appcmd.ExactArgs(1),
50+
Deprecated: deprecated,
4651
Run: builder.NewRunFunc(
4752
func(ctx context.Context, container appext.Container) error {
4853
return run(ctx, container, flags)

private/buf/cmd/buf/command/registry/module/moduleupdate/usage.gen.go renamed to private/buf/cmd/buf/command/registry/module/modulesettings/modulesettingsupdate/usage.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

private/buf/cmd/buf/command/registry/plugin/pluginupdate/pluginupdate.go renamed to private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate/pluginsettingsupdate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package pluginupdate
15+
package pluginsettingsupdate
1616

1717
import (
1818
"context"

private/buf/cmd/buf/command/registry/plugin/pluginupdate/usage.gen.go renamed to private/buf/cmd/buf/command/registry/plugin/pluginsettings/pluginsettingsupdate/usage.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)