From a4a7ad2337484ef1586152096c67fa488e41a107 Mon Sep 17 00:00:00 2001 From: davidles Date: Sun, 2 Jun 2024 16:19:38 +0300 Subject: [PATCH 1/3] Add back removed flags --- evidence/cli/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evidence/cli/flags.go b/evidence/cli/flags.go index f3d1093..9805611 100644 --- a/evidence/cli/flags.go +++ b/evidence/cli/flags.go @@ -45,7 +45,7 @@ var flagsMap = map[string]components.Flag{ var commandFlags = map[string][]string{ CreateEvidence: { - url, user, password, accessToken, ServerId, + url, user, password, accessToken, ServerId, EvdPredicate, EvdPredicateType, EvdSubject, EvdKey, EvdKeyId, }, } From 0d57c7fc9dfc96e7222b56ef5c04b2bf976e9636 Mon Sep 17 00:00:00 2001 From: davidles Date: Sun, 2 Jun 2024 16:44:11 +0300 Subject: [PATCH 2/3] Fix flag descriptions --- evidence/cli/docs/create/help.go | 8 +------- evidence/cli/flags.go | 8 ++++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/evidence/cli/docs/create/help.go b/evidence/cli/docs/create/help.go index 1fc774a..f65c806 100644 --- a/evidence/cli/docs/create/help.go +++ b/evidence/cli/docs/create/help.go @@ -7,11 +7,5 @@ func GetDescription() string { } func GetArguments() []components.Argument { - return []components.Argument{ - {Name: "predicate", Optional: false, Description: "Path to the predicate, arbitrary JSON."}, - {Name: "predicate-type", Optional: false, Description: "Type of the predicate."}, - {Name: "subject", Optional: false, Description: "Full path to some subjects' location, an artifact."}, - {Name: "key", Optional: false, Description: "Path to a private key that will sign the DSSE. Supported keys: 'ecdsa','rsa' and 'ed25519'."}, - {Name: "key-name", Optional: true, Description: "Keyid."}, - } + return []components.Argument{} } diff --git a/evidence/cli/flags.go b/evidence/cli/flags.go index 9805611..69e8565 100644 --- a/evidence/cli/flags.go +++ b/evidence/cli/flags.go @@ -36,10 +36,10 @@ var flagsMap = map[string]components.Flag{ password: components.NewStringFlag(password, "JFrog password.", func(f *components.StringFlag) { f.Mandatory = false }), accessToken: components.NewStringFlag(accessToken, "JFrog access token.", func(f *components.StringFlag) { f.Mandatory = false }), - EvdPredicate: components.NewStringFlag(EvdPredicate, "Path for a file containing the predicate. The file should contain a valid JSON predicate.", func(f *components.StringFlag) { f.Mandatory = true }), - EvdPredicateType: components.NewStringFlag(EvdPredicateType, "The type of the predicate.", func(f *components.StringFlag) { f.Mandatory = true }), - EvdSubject: components.NewStringFlag(EvdSubject, "Path for a file containing the subject.", func(f *components.StringFlag) { f.Mandatory = true }), - EvdKey: components.NewStringFlag(EvdKey, "Private key.", func(f *components.StringFlag) { f.Mandatory = true }), + EvdPredicate: components.NewStringFlag(EvdPredicate, "Path to the predicate, arbitrary JSON.", func(f *components.StringFlag) { f.Mandatory = true }), + EvdPredicateType: components.NewStringFlag(EvdPredicateType, "Type of the predicate.", func(f *components.StringFlag) { f.Mandatory = true }), + EvdSubject: components.NewStringFlag(EvdSubject, "Full path to some subjects' location, an artifact.", func(f *components.StringFlag) { f.Mandatory = true }), + EvdKey: components.NewStringFlag(EvdKey, "Path to a private key that will sign the DSSE. Supported keys: 'ecdsa','rsa' and 'ed25519'.", func(f *components.StringFlag) { f.Mandatory = true }), EvdKeyId: components.NewStringFlag(EvdKeyId, "KeyId", func(f *components.StringFlag) { f.Mandatory = false }), } From 577cc7a331010ad24e426375a451719283af034e Mon Sep 17 00:00:00 2001 From: davidles Date: Sun, 23 Jun 2024 12:58:14 +0300 Subject: [PATCH 3/3] Change messge --- evidence/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evidence/create.go b/evidence/create.go index bad6059..8e95f7d 100644 --- a/evidence/create.go +++ b/evidence/create.go @@ -142,7 +142,7 @@ func (ec *EvidenceCreateCommand) Run() error { if err != nil { return err } - clientlog.Output("Evidence is successfully created") + clientlog.Output("Evidence successfully created") return nil }