Skip to content

Commit

Permalink
move Deprecated: "Deprecated - use " + ocm.CommonTransportFormat + "
Browse files Browse the repository at this point in the history
instead",
  • Loading branch information
hilmarf committed Jan 14, 2025
1 parent 311d110 commit 06c7d8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
16 changes: 5 additions & 11 deletions cmds/ocm/commands/ocmcmds/componentarchive/create/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,16 @@ type Command struct {
// Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489
// NewCommand creates a new ctf command.
func NewCommand(ctx clictx.Context, names ...string) *cobra.Command {
c := utils.SetupCommand(
&Command{BaseCommand: utils.NewBaseCommand(ctx,
formatoption.New(comparch.GetFormats()...),
fileoption.NewCompArch(),
schemaoption.New(compdesc.DefaultSchemeVersion))},
utils.Names(Names, names...)...)
c.Deprecated = "Deprecated - use " + ocm.CommonTransportFormat + " instead"
return c
return utils.SetupCommand(&Command{BaseCommand: utils.NewBaseCommand(ctx, formatoption.New(comparch.GetFormats()...), fileoption.NewCompArch(), schemaoption.New(compdesc.DefaultSchemeVersion))}, utils.Names(Names, names...)...)
}

// Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489
func (o *Command) ForName(name string) *cobra.Command {
return &cobra.Command{
Use: "[<options>] <component> <version> --provider <provider-name> {--provider <label>=<value>} {<label>=<value>}",
Args: cobra.MinimumNArgs(2),
Short: "(DEPRECATED) create new component archive",
Use: "[<options>] <component> <version> --provider <provider-name> {--provider <label>=<value>} {<label>=<value>}",
Args: cobra.MinimumNArgs(2),
Short: "(DEPRECATED) create new component archive",
Deprecated: "Deprecated - use " + ocm.CommonTransportFormat + " instead",
Example: `
$ ocm create componentarchive --file myfirst --provider acme.org --provider email=alice@acme.org acme.org/demo 1.0
`,
Expand Down
11 changes: 5 additions & 6 deletions cmds/ocm/commands/ocmcmds/componentarchive/transfer/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Command struct {
// Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489
// NewCommand creates a new transfer command.
func NewCommand(ctx clictx.Context, names ...string) *cobra.Command {
c := utils.SetupCommand(
return utils.SetupCommand(
&Command{BaseCommand: utils.NewBaseCommand(ctx,
formatoption.New(),
lookupoption.New(),
Expand All @@ -50,16 +50,15 @@ func NewCommand(ctx clictx.Context, names ...string) *cobra.Command {
rscbyvalueoption.New(),
srcbyvalueoption.New(),
)}, utils.Names(Names, names...)...)
c.Deprecated = "Deprecated - use " + ocm.CommonTransportFormat + " instead"
return c
}

// Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489
func (o *Command) ForName(name string) *cobra.Command {
return &cobra.Command{
Use: "[<options>] <source> <target>",
Args: cobra.MinimumNArgs(2),
Short: "(DEPRECATED) transfer component archive to some component repository",
Use: "[<options>] <source> <target>",
Args: cobra.MinimumNArgs(2),
Short: "(DEPRECATED) transfer component archive to some component repository",
Deprecated: "Deprecated - use " + ocm.CommonTransportFormat + " instead",
Long: `
Transfer a component archive to some component repository. This might
be a CTF Archive or a regular repository.
Expand Down

0 comments on commit 06c7d8e

Please sign in to comment.