We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d799f83 commit a51e047Copy full SHA for a51e047
src/warnet/main.py
@@ -26,10 +26,11 @@ def version() -> None:
26
# First try to get the version from the installed package
27
try:
28
from warnet._version import __version__
29
+
30
version_str = __version__
31
except ImportError:
32
version_str = "0.0.0"
-
33
34
# Try to get git commit to append
35
36
# Check if we're in a git repository
@@ -44,7 +45,7 @@ def version() -> None:
44
45
46
# If we have a commit hash, append it to the version
47
# Don't append if already has a hash
- if commit and "-" not in version_str:
48
+ if commit and "-" not in version_str:
49
version_str = f"{version_str}-{commit}"
50
51
click.echo(f"warnet version {version_str}")
0 commit comments