Skip to content

Commit dc21376

Browse files
committed
cli: Improve help output for --rekor-version
Avoid saying "default: None", mention the valid values instead. Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 3c7fa40 commit dc21376

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ optional arguments:
9494

9595
<!-- @begin-sigstore-sign-help@ -->
9696
```
97-
usage: sigstore sign [-h] [-v] [--rekor-version REKOR_VERSION]
97+
usage: sigstore sign [-h] [-v] [--rekor-version VERSION]
9898
[--identity-token TOKEN] [--oidc-client-id ID]
9999
[--oidc-client-secret SECRET]
100100
[--oidc-disable-ambient-providers] [--oidc-issuer URL]
@@ -110,10 +110,10 @@ optional arguments:
110110
-h, --help show this help message and exit
111111
-v, --verbose run with additional debug logging; supply multiple
112112
times to increase verbosity (default: 0)
113-
--rekor-version REKOR_VERSION
114-
Force the rekor transparency log version (in case
115-
there are multiple in signing configuration) (default:
116-
None)
113+
--rekor-version VERSION
114+
Force the rekor transparency log version. Valid values
115+
are [1, 2]. By default the highest available version
116+
is used
117117
118118
OpenID Connect options:
119119
--identity-token TOKEN
@@ -156,8 +156,8 @@ Output options:
156156

157157
<!-- @begin-sigstore-attest-help@ -->
158158
```
159-
usage: sigstore attest [-h] [-v] [--rekor-version REKOR_VERSION] --predicate
160-
FILE --predicate-type TYPE [--identity-token TOKEN]
159+
usage: sigstore attest [-h] [-v] [--rekor-version VERSION] --predicate FILE
160+
--predicate-type TYPE [--identity-token TOKEN]
161161
[--oidc-client-id ID] [--oidc-client-secret SECRET]
162162
[--oidc-disable-ambient-providers] [--oidc-issuer URL]
163163
[--oauth-force-oob] [--bundle FILE] [--overwrite]
@@ -170,10 +170,10 @@ optional arguments:
170170
-h, --help show this help message and exit
171171
-v, --verbose run with additional debug logging; supply multiple
172172
times to increase verbosity (default: 0)
173-
--rekor-version REKOR_VERSION
174-
Force the rekor transparency log version (in case
175-
there are multiple in signing configuration) (default:
176-
None)
173+
--rekor-version VERSION
174+
Force the rekor transparency log version. Valid values
175+
are [1, 2]. By default the highest available version
176+
is used
177177
178178
DSSE options:
179179
--predicate FILE Path to the predicate file (default: None)

sigstore/_cli.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ def _parser() -> argparse.ArgumentParser:
291291
attest.add_argument(
292292
"--rekor-version",
293293
type=int,
294-
help="Force the rekor transparency log version (in case there are multiple in signing configuration)",
294+
metavar="VERSION",
295+
default=argparse.SUPPRESS,
296+
help="Force the rekor transparency log version. Valid values are [1, 2]. By default the highest available version is used",
295297
)
296298
attest.add_argument(
297299
"files",
@@ -356,7 +358,9 @@ def _parser() -> argparse.ArgumentParser:
356358
sign.add_argument(
357359
"--rekor-version",
358360
type=int,
359-
help="Force the rekor transparency log version (in case there are multiple in signing configuration)",
361+
metavar="VERSION",
362+
default=argparse.SUPPRESS,
363+
help="Force the rekor transparency log version. Valid values are [1, 2]. By default the highest available version is used",
360364
)
361365

362366
oidc_options = sign.add_argument_group("OpenID Connect options")

0 commit comments

Comments
 (0)