Skip to content

Commit 690f1c0

Browse files
authored
Use version which is treated CalVer by AwesomeVersion (#5572)
* Use version which is treated CalVer by AwesomeVersion The current dev version `99.9.9dev` is treated as unkown version type by AwesomeVersion. This prevents the version from comparing with actual Supervisor versions, e.g. from an exsiting backup file. Make the development version a valid CalVer version so development versions can handle non-development backups. * Bump to year 9999
1 parent 8e185a8 commit 690f1c0

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _get_supervisor_version():
1919
for line in CONSTANTS.split("/n"):
2020
if match := RE_SUPERVISOR_VERSION.match(line):
2121
return match.group(1)
22-
return "99.9.9dev"
22+
return "9999.09.9.dev9999"
2323

2424

2525
setup(

supervisor/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from aiohttp import __version__ as aiohttpversion
1111

12-
SUPERVISOR_VERSION = "99.9.9dev"
12+
SUPERVISOR_VERSION = "9999.09.9.dev9999"
1313
SERVER_SOFTWARE = f"HomeAssistantSupervisor/{SUPERVISOR_VERSION} aiohttp/{aiohttpversion} Python/{systemversion[0]}.{systemversion[1]}"
1414

1515
URL_HASSIO_ADDONS = "https://github.com/home-assistant/addons"

tests/api/test_root.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async def test_api_info(api_client):
1414
resp = await api_client.get("/info")
1515
result = await resp.json()
1616

17-
assert result["data"]["supervisor"] == "99.9.9dev"
17+
assert result["data"]["supervisor"] == "9999.09.9.dev9999"
1818
assert result["data"]["docker"] == "1.0.0"
1919
assert result["data"]["supported"] is True
2020
assert result["data"]["channel"] == "stable"

tests/backups/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def partial_backup_mock(backup_mock):
3939
backup_instance.sys_type = BackupType.PARTIAL
4040
backup_instance.folders = []
4141
backup_instance.addon_list = [TEST_ADDON_SLUG]
42-
backup_instance.supervisor_version = "99.9.9dev"
42+
backup_instance.supervisor_version = "9999.09.9.dev9999"
4343
yield backup_mock
4444

4545

@@ -50,7 +50,7 @@ def full_backup_mock(backup_mock):
5050
backup_instance.sys_type = BackupType.FULL
5151
backup_instance.folders = ALL_FOLDERS
5252
backup_instance.addon_list = [TEST_ADDON_SLUG]
53-
backup_instance.supervisor_version = "99.9.9dev"
53+
backup_instance.supervisor_version = "9999.09.9.dev9999"
5454
yield backup_mock
5555

5656

tests/test_coresys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ def test_now(coresys: CoreSys):
3939
def test_custom_user_agent(coresys: CoreSys):
4040
"""Test custom useragent."""
4141
assert (
42-
"HomeAssistantSupervisor/99.9.9dev"
42+
"HomeAssistantSupervisor/9999.09.9.dev9999"
4343
in coresys.websession._default_headers[USER_AGENT] # pylint: disable=protected-access
4444
)

0 commit comments

Comments
 (0)