Private
Public Access
1
0

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 <noreply@anthropic.com>
This commit is contained in:
2026-04-06 22:20:24 +01:00
parent 9b3ac8c31c
commit 526dedd653

View File

@@ -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"