Skip to content

Commit 5ce6a76

Browse files
Merge pull request #80 from 404GamerNotFound/codex/fix-filenotfounderror-for-config.yaml
fix: skip config version when missing
2 parents 467ce16 + 11458ae commit 5ce6a76

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

custom_components/vserver_ssh_stats/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"requirements": [
1313
"paramiko>=3.4.0"
1414
],
15-
"version": "1.2.5",
15+
"version": "1.2.6",
1616
"zeroconf": [
1717
{
1818
"type": "_ssh._tcp.local."

scripts/bump_version.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def update_manifest(new_version: str):
1717
MANIFEST_PATH.write_text(json.dumps(data, indent=2) + "\n")
1818

1919
def update_config(new_version: str):
20+
if not CONFIG_PATH.exists():
21+
return
2022
text = CONFIG_PATH.read_text()
2123
text = re.sub(r'version:\s*"\d+\.\d+\.\d+"', f'version: "{new_version}"', text)
2224
CONFIG_PATH.write_text(text)

0 commit comments

Comments
 (0)