fallback version info form CHANGELOG.md

This commit is contained in:
w-e-w 2023-06-02 21:50:08 +09:00
parent 3e995778fc
commit 0dd6bca4f1

View File

@ -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: