From 56261d7bcb98c2e8757fc519ad35865df16b2580 Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 5 Mar 2024 16:20:45 -0700 Subject: [PATCH] rename command Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/attestation.go | 4 ++-- .../tuf-root-verify.go} | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) rename pkg/cmd/attestation/{verifytufroot/verify-tuf-root.go => tufrootverify/tuf-root-verify.go} (85%) diff --git a/pkg/cmd/attestation/attestation.go b/pkg/cmd/attestation/attestation.go index ded45a69b..31f1ef6cb 100644 --- a/pkg/cmd/attestation/attestation.go +++ b/pkg/cmd/attestation/attestation.go @@ -4,8 +4,8 @@ import ( "github.com/cli/cli/v2/pkg/cmd/attestation/artifact/oci" "github.com/cli/cli/v2/pkg/cmd/attestation/download" "github.com/cli/cli/v2/pkg/cmd/attestation/inspect" + "github.com/cli/cli/v2/pkg/cmd/attestation/tufrootverify" "github.com/cli/cli/v2/pkg/cmd/attestation/verify" - "github.com/cli/cli/v2/pkg/cmd/attestation/verifytufroot" "github.com/cli/cli/v2/pkg/cmdutil" "github.com/MakeNowJust/heredoc" @@ -34,7 +34,7 @@ func NewCmdAttestation(f *cmdutil.Factory) *cobra.Command { root.AddCommand(download.NewDownloadCmd(f, ociClient)) root.AddCommand(inspect.NewInspectCmd(f, ociClient)) root.AddCommand(verify.NewVerifyCmd(f, ociClient)) - root.AddCommand(verifytufroot.NewVerifyTUFRootCmd(f)) + root.AddCommand(tufrootverify.NewTUFRootVerifyCmd(f)) return root } diff --git a/pkg/cmd/attestation/verifytufroot/verify-tuf-root.go b/pkg/cmd/attestation/tufrootverify/tuf-root-verify.go similarity index 85% rename from pkg/cmd/attestation/verifytufroot/verify-tuf-root.go rename to pkg/cmd/attestation/tufrootverify/tuf-root-verify.go index 09c3fa992..22074c709 100644 --- a/pkg/cmd/attestation/verifytufroot/verify-tuf-root.go +++ b/pkg/cmd/attestation/tufrootverify/tuf-root-verify.go @@ -1,4 +1,4 @@ -package verifytufroot +package tufrootverify import ( "fmt" @@ -14,21 +14,24 @@ import ( "github.com/spf13/cobra" ) -func NewVerifyTUFRootCmd(f *cmdutil.Factory) *cobra.Command { +func NewTUFRootVerifyCmd(f *cmdutil.Factory) *cobra.Command { var mirror string var root string var cmd = cobra.Command{ - Use: "verify-tuf-root --mirror --root ", + Use: "tuf-root-verify --mirror --root ", Args: cobra.ExactArgs(0), Short: "Verify the TUF repository from a provided TUF root", Long: heredoc.Docf(` - Verify a TUF repository from a local TUF root. + Verify a TUF repository with a local TUF root. The command requires you provide the %[1]s--mirror%[1]s flag, which should be the URL of the TUF repository mirror. The command also requires you provide the %[1]s--root%[1]s flag, which should be the path to the TUF root file. + + GitHub relies on TUF to securely deliver the trust root for our signing authority. + For more information on TUF, see the official documentation: . `, "`"), Example: heredoc.Doc(` # Verify the TUF repository from a provided TUF root