diff --git a/tasks.py b/tasks.py index 5eec35055346..b6ddcbc7f7cc 100644 --- a/tasks.py +++ b/tasks.py @@ -1846,6 +1846,12 @@ def check_already_current(tag=None, sha=None): if ref is None and tag is None: error('ERROR: Either ref or tag needs to be set.') + if tag == 'auto': + # Fetch the installed InvenTree version + import src.backend.InvenTree.InvenTree.version as InvenTreeVersion # type: ignore[import] + tag = InvenTreeVersion.inventreeVersion() + info(f'Auto-detected tag: {tag}') + if tag: tag = tag.lstrip('v') try: