mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-04-19 10:47:15 +00:00
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
This commit is contained in:
parent
8e185a8413
commit
690f1c07a7
2
setup.py
2
setup.py
@ -19,7 +19,7 @@ def _get_supervisor_version():
|
||||
for line in CONSTANTS.split("/n"):
|
||||
if match := RE_SUPERVISOR_VERSION.match(line):
|
||||
return match.group(1)
|
||||
return "99.9.9dev"
|
||||
return "9999.09.9.dev9999"
|
||||
|
||||
|
||||
setup(
|
||||
|
@ -9,7 +9,7 @@ from typing import Self
|
||||
|
||||
from aiohttp import __version__ as aiohttpversion
|
||||
|
||||
SUPERVISOR_VERSION = "99.9.9dev"
|
||||
SUPERVISOR_VERSION = "9999.09.9.dev9999"
|
||||
SERVER_SOFTWARE = f"HomeAssistantSupervisor/{SUPERVISOR_VERSION} aiohttp/{aiohttpversion} Python/{systemversion[0]}.{systemversion[1]}"
|
||||
|
||||
URL_HASSIO_ADDONS = "https://github.com/home-assistant/addons"
|
||||
|
@ -14,7 +14,7 @@ async def test_api_info(api_client):
|
||||
resp = await api_client.get("/info")
|
||||
result = await resp.json()
|
||||
|
||||
assert result["data"]["supervisor"] == "99.9.9dev"
|
||||
assert result["data"]["supervisor"] == "9999.09.9.dev9999"
|
||||
assert result["data"]["docker"] == "1.0.0"
|
||||
assert result["data"]["supported"] is True
|
||||
assert result["data"]["channel"] == "stable"
|
||||
|
@ -39,7 +39,7 @@ def partial_backup_mock(backup_mock):
|
||||
backup_instance.sys_type = BackupType.PARTIAL
|
||||
backup_instance.folders = []
|
||||
backup_instance.addon_list = [TEST_ADDON_SLUG]
|
||||
backup_instance.supervisor_version = "99.9.9dev"
|
||||
backup_instance.supervisor_version = "9999.09.9.dev9999"
|
||||
yield backup_mock
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ def full_backup_mock(backup_mock):
|
||||
backup_instance.sys_type = BackupType.FULL
|
||||
backup_instance.folders = ALL_FOLDERS
|
||||
backup_instance.addon_list = [TEST_ADDON_SLUG]
|
||||
backup_instance.supervisor_version = "99.9.9dev"
|
||||
backup_instance.supervisor_version = "9999.09.9.dev9999"
|
||||
yield backup_mock
|
||||
|
||||
|
||||
|
@ -39,6 +39,6 @@ def test_now(coresys: CoreSys):
|
||||
def test_custom_user_agent(coresys: CoreSys):
|
||||
"""Test custom useragent."""
|
||||
assert (
|
||||
"HomeAssistantSupervisor/99.9.9dev"
|
||||
"HomeAssistantSupervisor/9999.09.9.dev9999"
|
||||
in coresys.websession._default_headers[USER_AGENT] # pylint: disable=protected-access
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user