Skip to content

Commit

Permalink
fix: add dynamic version to egg_updater.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BenL-github committed Mar 21, 2022
1 parent 295b6d1 commit 822ff34
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cve_bin_tool/egg_updater.py
Original file line number Diff line number Diff line change
@@ -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(
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 822ff34

Please sign in to comment.