Skip to content

Commit

Permalink
chg: [release] Bumped version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Oct 13, 2023
1 parent cee82c2 commit 631ced3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# pyHIDS project news


### 0.9.2 (2023-13-10)

#### Fix

Fixed an issue related to the function responsible of returning the version of
the software.


### 0.9.1 (2023-13-10)

#### Changes
Expand Down
4 changes: 2 additions & 2 deletions bin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import argparse

from pyhids import __version__, utils
from pyhids import get_version, utils
from pyhids.genBase import main as genBase
from pyhids.genKeys import main as genKeys
from pyhids.hashlookup import main as hashlookup
Expand Down Expand Up @@ -97,7 +97,7 @@ def main():
arguments = parser.parse_args()

if arguments.version:
return __version__
return get_version()

if arguments.command == "gen-keys":
genKeys(arguments.nb_bits)
Expand Down
22 changes: 11 additions & 11 deletions pyhids/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
def get_version():
"""Returns the version of the software.
Checks if the Python package is installed or uses the Git tag."""
version = (
os.environ.get("PKGVER")
or subprocess.run(
["git", "-C", BASE_DIR, "describe", "--tags"], stdout=subprocess.PIPE
)
.stdout.decode()
.strip()
) or ""
try:
version = (
os.environ.get("PKGVER")
or subprocess.run(
["git", "-C", BASE_DIR, "describe", "--tags"], stdout=subprocess.PIPE
)
.stdout.decode()
.strip()
) or ""
except Exception:
version = ""
if not version:
try:
version = "v" + importlib.metadata.version("pyhids") # type: ignore
except PackageNotFoundError:
version = ""
return version


__version__ = get_version()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyHIDS"
version = "0.9.1"
version = "0.9.2"
description = "A host-based intrusion detection system."
authors = ["Cédric Bonhomme <cedric@cedricbonhomme.org>"]
license = "GPL-3.0-or-later"
Expand Down

0 comments on commit 631ced3

Please sign in to comment.