mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-10-16 02:51:56 +00:00
fix: show Home Assistant add-on version in EOSdash (#1356)
Align add-on and EOSdash version.
This commit is contained in:
@@ -323,8 +323,15 @@ def _version_calculate() -> str:
|
||||
# Project version information
|
||||
# ---------------------------
|
||||
|
||||
# The version
|
||||
__version__ = _version_calculate()
|
||||
# Home Assistant passes the add-on's config.yaml version as BUILD_VERSION. A
|
||||
# Docker build without a concrete version uses "dev" (or a branch name), so
|
||||
# keep the source-derived version in that case.
|
||||
_build_version = os.getenv("EOS_BUILD_VERSION", "")
|
||||
__version__ = (
|
||||
_build_version
|
||||
if re.fullmatch(r"\d+\.\d+\.\d+(?:\.dev\d+)?", _build_version)
|
||||
else _version_calculate()
|
||||
)
|
||||
|
||||
|
||||
# -------------------
|
||||
|
||||
Reference in New Issue
Block a user