Skip to content

Commit b4a377c

Browse files
committed
Report mergin/geodiff versions in CLI
1 parent 22aff4b commit b4a377c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mergin/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
LoginError,
2222
MerginClient,
2323
MerginProject,
24+
__version__,
2425
)
2526
from mergin.client_pull import (
2627
download_project_async,
@@ -31,6 +32,8 @@
3132
from mergin.client_pull import pull_project_async, pull_project_is_running, pull_project_finalize, pull_project_cancel
3233
from mergin.client_push import push_project_async, push_project_is_running, push_project_finalize, push_project_cancel
3334

35+
from pygeodiff import GeoDiff
36+
3437

3538
class OptionPasswordIfUser(click.Option):
3639
"""Custom option class for getting a password only if the --username option was specified."""
@@ -135,7 +138,7 @@ def _print_unhandled_exception():
135138
click.echo(line)
136139

137140

138-
@click.group()
141+
@click.group(epilog=f"Copyright (C) 2019-2021 Lutra Consulting\n\n(mergin-py-client v{__version__} / pygeodiff v{GeoDiff().version()})")
139142
@click.option(
140143
"--url",
141144
envvar="MERGIN_URL",
@@ -150,9 +153,11 @@ def cli(ctx, url, auth_token, username, password):
150153
"""
151154
Command line interface for the Mergin client module.
152155
For user authentication on server there are two options:
156+
153157
1. authorization token environment variable (MERGIN_AUTH) is defined, or
154158
2. username and password need to be given either as environment variables (MERGIN_USERNAME, MERGIN_PASSWORD),
155159
or as command options (--username, --password).
160+
156161
Run `mergin --username <your_user> login` to see how to set the token variable manually.
157162
"""
158163
mc = get_client(url=url, auth_token=auth_token, username=username, password=password)

0 commit comments

Comments
 (0)