Skip to content

Commit

Permalink
Fixed documentation website version
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen1999 committed Jan 18, 2025
1 parent 46ba458 commit 117ae9a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions suricata_check/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
import subprocess
from importlib.metadata import PackageNotFoundError, requires, version
import setuptools_git_versioning

SURICATA_CHECK_DIR = os.path.dirname(__file__)

Expand All @@ -22,8 +23,12 @@ def get_version() -> str:

git_dir = os.path.join(SURICATA_CHECK_DIR, "..", ".git")
if os.path.exists(git_dir):
v = __get_git_revision_short_hash()
_logger.debug("Detected suricata-check version using git: %s", v)
try:
v = setuptools_git_versioning.get_version()
_logger.debug("Detected suricata-check version using setuptools_git_versioning: %s", v)
except: # noqa: E722
v = __get_git_revision_short_hash()
_logger.debug("Detected suricata-check version using git: %s", v)
else:
try:
v = version("suricata-check")
Expand Down

0 comments on commit 117ae9a

Please sign in to comment.