fix: device id in solution follows configuration (#964)
Some checks are pending
Bump Version / Bump Version Workflow (push) Waiting to run
CodeQL Advanced / Analyze (actions) (push) Waiting to run
CodeQL Advanced / Analyze (python) (push) Waiting to run
docker-build / platform-excludes (push) Waiting to run
docker-build / build (push) Blocked by required conditions
docker-build / merge (push) Blocked by required conditions
pre-commit / pre-commit (push) Waiting to run
Run Pytest on Pull Request / test (push) Waiting to run

Make device id in solution follow actual configuration.

Adapt version update to new CI bump workflow design.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2026-03-18 08:41:28 +01:00
committed by GitHub
parent ff698baef7
commit 5fb5234e7d
8 changed files with 70 additions and 40 deletions

View File

@@ -19,6 +19,11 @@ PACKAGE_DIR = PROJECT_ROOT / "src" / "akkudoktoreos"
SRC_DIR = PROJECT_ROOT / "src"
sys.path.insert(0, str(SRC_DIR))
DEFAULT_VERSION_FILES = [
PROJECT_ROOT / ".env", # Docker compose default environment
PROJECT_ROOT / "config.yaml", # Home Assistant config
]
# --- Patterns to match version strings ---
VERSION_PATTERNS = [
@@ -146,10 +151,13 @@ def main(version: str, files: List[str]):
if __name__ == "__main__":
if len(sys.argv) < 3:
print("Usage: python update_version.py <version> <file1> [file2 ...]")
if len(sys.argv) < 2:
print("Usage: python update_version.py <version> [<file1> [file2 ...]]")
sys.exit(1)
version_arg = sys.argv[1]
files_arg = sys.argv[2:]
if len(sys.argv) == 2:
files_arg = [str(f) for f in DEFAULT_VERSION_FILES]
else:
files_arg = sys.argv[2:]
main(version_arg, files_arg)