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"