aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-06-02 21:50:08 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-06-02 22:02:21 +0900
commit0dd6bca4f1a449b7ad9fa77fab0037aa98d21ced (patch)
tree3a5f2340ddb66598c4c3369fc66084f934dfc805 /modules
parent3e995778fc525ff15d56c1472c1a1bc701019ec5 (diff)
fallback version info form CHANGELOG.md
Diffstat (limited to 'modules')
-rw-r--r--modules/launch_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/launch_utils.py b/modules/launch_utils.py
index 6e9bb770..e7dbc5b2 100644
--- a/modules/launch_utils.py
+++ b/modules/launch_utils.py
@@ -68,7 +68,8 @@ def git_tag():
try:
return subprocess.check_output([git, "describe", "--tags"], shell=False, encoding='utf8').strip()
except Exception:
- return "<none>"
+ with open(os.path.dirname(os.path.abspath(__file__)) + "/../CHANGELOG.md") as file:
+ return next((line.strip() for line in file if line.strip()), "<none>")
def run(command, desc=None, errdesc=None, custom_env=None, live: bool = default_command_live) -> str: