diff --git a/cve_bin_tool/egg_updater.py b/cve_bin_tool/egg_updater.py index 40d2ada2e8..9dde15a218 100644 --- a/cve_bin_tool/egg_updater.py +++ b/cve_bin_tool/egg_updater.py @@ -1,12 +1,19 @@ # Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: GPL-3.0-or-later +import ast import os import sys from io import StringIO from setuptools.dist import Distribution +with open(os.path.join("cve_bin_tool", "version.py")) as f: + for line in f: + if line.startswith("VERSION"): + VERSION = ast.literal_eval(line.strip().split("=")[-1].strip()) + break + def IS_DEVELOP() -> bool: return any( @@ -35,7 +42,7 @@ def update_egg() -> None: script_name="setup.py", script_args=["egg_info"], name="cve-bin-tool", - version="3.0", + version=VERSION, entry_points={ "console_scripts": [ "cve-bin-tool = cve_bin_tool.cli:main",