diff --git a/cmds/ocm/commands/ocmcmds/componentarchive/cmd.go b/cmds/ocm/commands/ocmcmds/componentarchive/cmd.go index 5ec76b916..0a5c8b82c 100644 --- a/cmds/ocm/commands/ocmcmds/componentarchive/cmd.go +++ b/cmds/ocm/commands/ocmcmds/componentarchive/cmd.go @@ -4,6 +4,7 @@ import ( "github.com/spf13/cobra" clictx "ocm.software/ocm/api/cli" + "ocm.software/ocm/api/ocm" "ocm.software/ocm/cmds/ocm/commands/ocmcmds/componentarchive/create" "ocm.software/ocm/cmds/ocm/commands/ocmcmds/componentarchive/transfer" "ocm.software/ocm/cmds/ocm/commands/ocmcmds/names" @@ -19,7 +20,8 @@ var Names = names.ComponentArchive // NewCommand creates a new command. func NewCommand(ctx clictx.Context) *cobra.Command { cmd := utils.MassageCommand(&cobra.Command{ - Short: "Commands acting on component archives", + Short: "Commands acting on component archives", + Deprecated: "Deprecated - use " + ocm.CommonTransportFormat + " instead", }, Names...) cmd.AddCommand(transfer.NewCommand(ctx, transfer.Verb)) cmd.AddCommand(create.NewCommand(ctx, create.Verb)) diff --git a/cmds/ocm/commands/ocmcmds/componentarchive/create/cmd.go b/cmds/ocm/commands/ocmcmds/componentarchive/create/cmd.go index 47b093c24..415bea431 100644 --- a/cmds/ocm/commands/ocmcmds/componentarchive/create/cmd.go +++ b/cmds/ocm/commands/ocmcmds/componentarchive/create/cmd.go @@ -10,6 +10,7 @@ import ( "github.com/spf13/pflag" clictx "ocm.software/ocm/api/cli" + "ocm.software/ocm/api/ocm" "ocm.software/ocm/api/ocm/compdesc" metav1 "ocm.software/ocm/api/ocm/compdesc/meta/v1" "ocm.software/ocm/api/ocm/extensions/attrs/compatattr" @@ -53,7 +54,14 @@ 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 { - return utils.SetupCommand(&Command{BaseCommand: utils.NewBaseCommand(ctx, formatoption.New(comparch.GetFormats()...), fileoption.NewCompArch(), schemaoption.New(compdesc.DefaultSchemeVersion))}, utils.Names(Names, names...)...) + 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 } // Deprecated: Component Archive (CA) - https://kubernetes.slack.com/archives/C05UWBE8R1D/p1734357630853489 diff --git a/cmds/ocm/commands/ocmcmds/componentarchive/transfer/cmd.go b/cmds/ocm/commands/ocmcmds/componentarchive/transfer/cmd.go index 1e9d88da9..68aa89e59 100644 --- a/cmds/ocm/commands/ocmcmds/componentarchive/transfer/cmd.go +++ b/cmds/ocm/commands/ocmcmds/componentarchive/transfer/cmd.go @@ -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 { - return utils.SetupCommand( + c := utils.SetupCommand( &Command{BaseCommand: utils.NewBaseCommand(ctx, formatoption.New(), lookupoption.New(), @@ -50,6 +50,8 @@ 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