ci: treat 'dev' version string like 'today' version string
@@ -679,6 +679,7 @@ epoch_date = datetime.datetime.fromisoformat('2020-04-01')
# special version value - use "today" as gardenlinux epoch (depend on build-time)
version_today = 'today'
+version_dev = 'dev'
def gardenlinux_epoch(date: typing.Union[str, datetime.datetime] = None):
@@ -757,7 +758,7 @@ def next_release_version_from_workingtree(
):
version_str = _parse_version_from_workingtree(version_file_path=version_file_path)
- if version_str == version_today:
+ if version_str == version_today or version_str == version_dev:
# the first release-candidate is always <gardenlinux-epoch>.0
return f'{gardenlinux_epoch_from_workingtree(epoch = epoch)}.0'
@@ -796,7 +797,7 @@ def gardenlinux_epoch_from_workingtree(
except ValueError:
pass
- if version_str == version_today:
+ if version_str == version_today or version_str == version_dev:
return epoch
raise ValueError(f'{version_str=} was not understood - either semver or "today" are supported')
