Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9336865
D5326.id19121.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
629 B
Subscribers
None
D5326.id19121.diff
View Options
diff --git a/swh/counters/cli.py b/swh/counters/cli.py
--- a/swh/counters/cli.py
+++ b/swh/counters/cli.py
@@ -4,6 +4,7 @@
# See top-level LICENSE file for more information
import click
+from importlib_metadata import version
from swh.core.cli import CONTEXT_SETTINGS
from swh.core.cli import swh as swh_cli_group
@@ -18,6 +19,9 @@
type=click.Path(exists=True, dir_okay=False,),
help="Configuration file.",
)
+@click.version_option(
+ version=version("swh-counters"), prog_name="swh-counters",
+)
@click.pass_context
def counters_cli_group(ctx, config_file):
"""Software Heritage Counters tools."""
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jul 3 2025, 7:46 AM (10 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218649
Attached To
D5326: Add a --version option to all the CLI commands
Event Timeline
Log In to Comment