Skip to content

Commit

Permalink
fix:version_file
Browse files Browse the repository at this point in the history
automations messed up version.py file
  • Loading branch information
JarbasAl committed Sep 12, 2024
1 parent 32e31ec commit 0dc6673
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion ovos_core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,33 @@
VERSION_MINOR = 0
VERSION_BUILD = 8
VERSION_ALPHA = 132
# END_VERSION_BLOCK
# END_VERSION_BLOCK

# for compat with old imports
OVOS_VERSION_MAJOR = VERSION_MAJOR
OVOS_VERSION_MINOR = VERSION_MINOR
OVOS_VERSION_BUILD = VERSION_BUILD
OVOS_VERSION_ALPHA = VERSION_ALPHA

OVOS_VERSION_TUPLE = (VERSION_MAJOR,
VERSION_MINOR,
VERSION_BUILD)
OVOS_VERSION_STR = '.'.join(map(str, OVOS_VERSION_TUPLE))


class VersionManager:
@staticmethod
def get():
return {"OpenVoiceOSVersion": OVOS_VERSION_STR}


def check_version(version_string):
"""
Check if current version is equal or higher than the
version string provided to the function
Args:
version_string (string): version string ('Major.Minor.Build')
"""
version_tuple = tuple(map(int, version_string.split('.')))
return OVOS_VERSION_TUPLE >= version_tuple

0 comments on commit 0dc6673

Please sign in to comment.