Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move registry update commands under setting #3528

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 setting update`. Command
`buf registry module update` is now deprecated.

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

Expand Down
21 changes: 17 additions & 4 deletions private/buf/cmd/buf/buf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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),
},
},
{
Expand All @@ -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),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package moduleupdate
package modulesettingupdate

import (
"context"
Expand All @@ -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 + " <remote/owner/module>",
Short: "Update BSR module settings",
Args: appcmd.ExactArgs(1),
Use: name + " <remote/owner/module>",
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)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package pluginupdate
package pluginsettingupdate

import (
"context"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading