Skip to content

Commit

Permalink
chore: update sign command descriptions to align with the spec (notar…
Browse files Browse the repository at this point in the history
…yproject#543)

After discussion with @yizha1, aligning with the spec in this [PR](notaryproject#540).

Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
  • Loading branch information
Two-Hearts committed Feb 10, 2023
1 parent 33c2281 commit c47a452
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/notation/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Example - Sign an OCI artifact and use OCI image manifest to store the signature
opts.SecureFlagOpts.ApplyFlags(command.Flags())
cmd.SetPflagExpiry(command.Flags(), &opts.expiry)
cmd.SetPflagPluginConfig(command.Flags(), &opts.pluginConfig)
command.Flags().StringVar(&opts.signatureManifest, "signature-manifest", signatureManifestArtifact, "manifest type for signatures. options: artifact, image")
command.Flags().StringVar(&opts.signatureManifest, "signature-manifest", signatureManifestArtifact, "manifest type for signature. options: \"artifact\", \"image\"")
cmd.SetPflagUserMetadata(command.Flags(), &opts.userMetadata, cmd.PflagUserMetadataSignUsage)
return command
}
Expand Down
3 changes: 1 addition & 2 deletions internal/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var (

PflagSignatureFormat = &pflag.Flag{
Name: "signature-format",
Usage: "signature envelope format, options: 'jws', 'cose'",
Usage: "signature envelope format, options: \"jws\", \"cose\"",
}
SetPflagSignatureFormat = func(fs *pflag.FlagSet, p *string) {
defaultSignatureFormat := envelope.JWS
Expand Down Expand Up @@ -80,7 +80,6 @@ var (
Name: "user-metadata",
Shorthand: "m",
}

PflagUserMetadataSignUsage = "{key}={value} pairs that are added to the signature payload"
PflagUserMetadataVerifyUsage = "user defined {key}={value} pairs that must be present in the signature for successful verification if provided"
SetPflagUserMetadata = func(fs *pflag.FlagSet, p *[]string, usage string) {
Expand Down

0 comments on commit c47a452

Please sign in to comment.