Skip to content

Commit

Permalink
Display which version of Python is running
Browse files Browse the repository at this point in the history
  • Loading branch information
vilhelmprytz committed Apr 11, 2022
1 parent 358b1dc commit 157186c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wilfred/wilfred.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,17 @@ def print_version(ctx, param, value):
if "SNAP" in os.environ and "SNAP_REVISION" in os.environ
else ""
)
_python_version = (
f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
)

check_for_new_releases(enable_emojis=ENABLE_EMOJIS)
if str(version) == "0.0.0.dev0":
click.echo(
"".join(
(
f"{'✨ ' if ENABLE_EMOJIS else ''}wilfred version ",
f"{_commit_hash}/edge (development build) built {commit_date}{_snap}",
f"{_commit_hash}/edge (development build) built {commit_date}{_snap} (python {_python_version})",
)
)
)
Expand All @@ -125,7 +128,7 @@ def print_version(ctx, param, value):
"".join(
(
f"{'✨ ' if ENABLE_EMOJIS else ''}wilfred version ",
f"v{version}/stable (commit {_commit_hash}) built {commit_date}{_snap}",
f"v{version}/stable (commit {_commit_hash}) built {commit_date}{_snap} (python {_python_version})",
)
)
)
Expand Down

1 comment on commit 157186c

@oskarniziol
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Please sign in to comment.