From f266373bdca88f13a90a0369b146bb8019959b13 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Wed, 12 Aug 2026 14:42:50 +0100 Subject: [PATCH] added graceful fallback for version tagging --- cli/deploy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/deploy.py b/cli/deploy.py index 8531c7b..2b76971 100644 --- a/cli/deploy.py +++ b/cli/deploy.py @@ -47,7 +47,13 @@ def tag_version(): except Exception as e: logger.error(f"Bumpver failed: {e}") - current_tag = git("describe", "--tags", "--abbrev=0").strip() + try: + current_tag = git("describe", "--tags", "--abbrev=0").strip() + except Exception: + import datetime + + current_tag = "v" + datetime.datetime.now(datetime.UTC).strftime("%Y%m%d%H%M%S") + logger.warning(f"No git tags found, using timestamp {current_tag}") logger.info(f"Current tag is {current_tag}") with local.cwd(REPO_DIR):