Commit df5a3cbe authored by w-e-w's avatar w-e-w

fallback version info form CHANGELOG.md

parent d1bfc86f
......@@ -69,7 +69,8 @@ def git_tag():
return subprocess.check_output([git, "describe", "--tags"], shell=False, encoding='utf8').strip()
except Exception:
try:
changelog_md = pathlib.Path(__file__).parent.parent / "CHANGELOG.md"
from pathlib import Path
changelog_md = Path(__file__).parent.parent / "CHANGELOG.md"
with changelog_md.open(encoding="utf-8") as file:
return next((line.strip() for line in file if line.strip()), "<none>")
except Exception:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment