44# This script can be used in both Bitrise and GitHub Actions workflows
55#
66# Usage:
7- # ./scripts/upload-to-testflight.sh <pipeline_name> <branch> [ipa_path] [testflight_group]
7+ # ./scripts/upload-to-testflight.sh <pipeline_name> <branch> [ipa_path] [testflight_group] [distribute_external]
88#
99# Arguments:
10- # pipeline_name - Pipeline or workflow name (required)
11- # branch - Git branch name (required)
12- # ipa_path - Optional: Direct path to IPA file (if not provided, uses find-ipa-file.sh)
13- # testflight_group - Optional: TestFlight external testing group name (default: MetaMask BETA & Release Candidates)
10+ # pipeline_name - Pipeline or workflow name (required)
11+ # branch - Git branch name (required)
12+ # ipa_path - Optional: Direct path to IPA file (if not provided, uses find-ipa-file.sh)
13+ # testflight_group - Optional: TestFlight external testing group name (default: MetaMask BETA & Release Candidates)
14+ # distribute_external - Optional: Whether to distribute to external testers (default: true)
1415#
1516# Environment variables:
1617# IPA_PATH - IPA path (set by find-ipa-file.sh if not provided as argument)
@@ -27,6 +28,7 @@ PIPELINE_NAME="$1"
2728BRANCH=" $2 "
2829LOCAL_IPA_PATH=" $3 "
2930TESTFLIGHT_GROUP=" ${4:- MetaMask BETA & Release Candidates} "
31+ DISTRIBUTE_EXTERNAL=" ${5:- true} "
3032
3133# Get IPA path: use argument if provided, otherwise use find-ipa-file.sh
3234if [ -n " $LOCAL_IPA_PATH " ]; then
7476bundle exec fastlane upload_to_testflight_only \
7577 ipa_path:" $IPA_PATH " \
7678 groups:" $TESTFLIGHT_GROUP " \
77- changelog:" $CHANGELOG "
79+ changelog:" $CHANGELOG " \
80+ distribute_external:" $DISTRIBUTE_EXTERNAL "
7881
0 commit comments