certmate-cli 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {certmate_cli-0.1.3 → certmate_cli-0.1.4}/PKG-INFO +1 -1
- {certmate_cli-0.1.3 → certmate_cli-0.1.4}/certmate_cli/__init__.py +1 -1
- {certmate_cli-0.1.3 → certmate_cli-0.1.4}/certmate_cli/main.py +25 -0
- {certmate_cli-0.1.3 → certmate_cli-0.1.4}/pyproject.toml +1 -1
- {certmate_cli-0.1.3 → certmate_cli-0.1.4}/.gitignore +0 -0
- {certmate_cli-0.1.3 → certmate_cli-0.1.4}/README.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: certmate-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: CertMate command-line interface — the SSL certificate lifecycle from your terminal
|
|
5
5
|
Project-URL: Homepage, https://github.com/fabriziosalmi/certmate
|
|
6
6
|
Project-URL: Source, https://github.com/fabriziosalmi/certmate/tree/main/clients/certmate-cli
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""certmate-cli — the CertMate SSL lifecycle from your terminal (built on certmate-sdk)."""
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.4"
|
|
@@ -39,6 +39,24 @@ app.add_typer(deploy_app, name="deploy")
|
|
|
39
39
|
out = Console()
|
|
40
40
|
err = Console(stderr=True)
|
|
41
41
|
|
|
42
|
+
|
|
43
|
+
def _version_callback(value: bool) -> None:
|
|
44
|
+
"""`--version` prints the version and exits 0, before anything else runs.
|
|
45
|
+
|
|
46
|
+
It has to be eager: the flag must work with no server configured, no
|
|
47
|
+
token, and no network — reporting which build you have is the first thing
|
|
48
|
+
anyone does when something is wrong.
|
|
49
|
+
"""
|
|
50
|
+
if value:
|
|
51
|
+
from certmate_cli import __version__
|
|
52
|
+
|
|
53
|
+
# Plain print, not `out.print`: a version string gets piped and
|
|
54
|
+
# compared, so it must not pick up Rich's wrapping or markup.
|
|
55
|
+
print(__version__)
|
|
56
|
+
raise typer.Exit(0)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
42
60
|
# A lax hostname/wildcard check for the client-side --dry-run preflight; the
|
|
43
61
|
# server is the real authority, this just catches obvious typos before we
|
|
44
62
|
# spend an API call.
|
|
@@ -71,6 +89,13 @@ def _main(
|
|
|
71
89
|
help="API bearer token. Prefer the CERTMATE_TOKEN "
|
|
72
90
|
"environment variable: --token is visible to other "
|
|
73
91
|
"local processes (ps) and shell history."),
|
|
92
|
+
# Lives on THIS callback rather than a second one: Typer keeps only one
|
|
93
|
+
# root callback, so a separate `@app.callback()` silently replaces this
|
|
94
|
+
# whole function — including the --token warning above.
|
|
95
|
+
version: Optional[bool] = typer.Option(None, "--version", "-V",
|
|
96
|
+
callback=_version_callback,
|
|
97
|
+
is_eager=True,
|
|
98
|
+
help="Show the certmate-cli version and exit."),
|
|
74
99
|
):
|
|
75
100
|
# Kept for compatibility, but discourage --token interactively: argv is
|
|
76
101
|
# world-readable via ps and lands in shell history. Warn only on a TTY so
|
|
File without changes
|
|
File without changes
|