mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-05-03 02:56:20 +00:00
fix: device id in solution follows configuration (#964)
Some checks failed
Bump Version / Bump Version Workflow (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
Some checks failed
Bump Version / Bump Version Workflow (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user