diff --git a/pkg/cmd/attestation/root.go b/pkg/cmd/attestation/root.go index f24194910..0ba61cd56 100644 --- a/pkg/cmd/attestation/root.go +++ b/pkg/cmd/attestation/root.go @@ -3,25 +3,18 @@ package attestation import ( "github.com/github/gh-attestation/cmd/app" - "github.com/cli/cli/v2/pkg/cmdutil" + "github.com/cli/cli/v2/pkg/iostreams" "github.com/spf13/cobra" ) -func NewCmdAttestation(f *cmdutil.Factory) *cobra.Command { +func NewCmdAttestation(io *iostreams.IOStreams, version, buildDate string) *cobra.Command { root := &cobra.Command{ Use: "attestation", Short: "attestations", - // Aliases: []string{"cs"}, - // GroupID: "core", } - version := "test" - date := "test" - shortSHA := "test" - - root.AddCommand(app.NewDownloadCmd(version, date)) - root.AddCommand(app.NewVerifyCmd(version, date)) - root.AddCommand(app.NewVersionCmd(version, date, shortSHA)) + root.AddCommand(app.NewDownloadCmd(version, buildDate)) + root.AddCommand(app.NewVerifyCmd(version, buildDate)) root.AddCommand(app.NewTUFRootVerifyCmd()) return root diff --git a/pkg/cmd/root/root.go b/pkg/cmd/root/root.go index b9600145f..b97dc09f0 100644 --- a/pkg/cmd/root/root.go +++ b/pkg/cmd/root/root.go @@ -125,7 +125,7 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) (*cobra.Command, cmd.AddCommand(actionsCmd.NewCmdActions(f)) cmd.AddCommand(aliasCmd.NewCmdAlias(f)) cmd.AddCommand(authCmd.NewCmdAuth(f)) - cmd.AddCommand(attestationCmd.NewCmdAttestation(f)) + cmd.AddCommand(attestationCmd.NewCmdAttestation(f.IOStreams, version, buildDate)) cmd.AddCommand(configCmd.NewCmdConfig(f)) cmd.AddCommand(creditsCmd.NewCmdCredits(f, nil)) cmd.AddCommand(gistCmd.NewCmdGist(f))