diff --git a/scripts/detect-changes.sh b/scripts/detect-changes.sh index 2a87166..33ca051 100755 --- a/scripts/detect-changes.sh +++ b/scripts/detect-changes.sh @@ -4,6 +4,27 @@ set -e +# Manual triggers for full matrix: +# 1. CI variable: TEST_ALL_SDKS=true +# 2. Commit message contains [test-all] +# 3. Tag push (releases test everything) + +if [ "$TEST_ALL_SDKS" = "true" ]; then + echo '{"changed_langs": ["all"], "reason": "TEST_ALL_SDKS variable set", "test_all": true}' + exit 0 +fi + +COMMIT_MSG=$(git log -1 --pretty=%B 2>/dev/null || echo "") +if echo "$COMMIT_MSG" | grep -qi '\[test-all\]'; then + echo '{"changed_langs": ["all"], "reason": "Commit message contains [test-all]", "test_all": true}' + exit 0 +fi + +if [ -n "$CI_COMMIT_TAG" ]; then + echo '{"changed_langs": ["all"], "reason": "Tag release - testing all SDKs", "test_all": true}' + exit 0 +fi + # Get the base branch for comparison if [ -n "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then # MR context