From 526dedd6537798e005013ed6fec1f9791a373875 Mon Sep 17 00:00:00 2001 From: SilverLABS Date: Mon, 6 Apr 2026 22:20:24 +0100 Subject: [PATCH] fix(ci): derive tag from git when CM_TAG is unset Codemagic doesn't set CM_TAG for Gitea webhook integrations. Fall back to git tag --points-at HEAD. Co-Authored-By: Claude Sonnet 4.6 --- codemagic.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codemagic.yaml b/codemagic.yaml index 0e0fc46..1d540e2 100644 --- a/codemagic.yaml +++ b/codemagic.yaml @@ -62,7 +62,8 @@ workflows: echo "TAG=$CM_TAG BUILD_DIR=$CM_BUILD_DIR" echo "GITEA_API=$GITEA_API TOKEN_SET=yes" - TAG="$CM_TAG" + TAG="${CM_TAG:-$(git tag --points-at HEAD | head -1)}" + [ -n "$TAG" ] || { echo "ERROR: could not determine tag"; exit 1; } VERSION="${TAG#v}" IPA="$CM_BUILD_DIR/SilverApple.ipa"