blob: 815dfcf0a2e6d6476b63d48621b372ad44c1650a [file] [log] [blame]
#!/usr/bin/env bash
# Copyright 2024 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -exo pipefail
if [ -z "$3" ]; then
echo -e "Usage: ios-deploy.sh \$SRC_DIR \$INSTALL_DIR \$OUTPUT_DIR " 1>&2
exit 1
fi
set -u
SRC_DIR="$1"
OUTPUT_DIR="$3"
REMOTE_URL="https://flutter.googlesource.com/third_party/ios-deploy"
git clone "$REMOTE_URL" "$SRC_DIR"
cd "$SRC_DIR"
git rev-parse HEAD > "commit_sha.txt"
xcodebuild -configuration Release SYMROOT=build GCC_PREPROCESSOR_DEFINITIONS="NDEBUG=1 IOS_DEPLOY_FEATURE_DEVELOPER_MODE=YES"
cp LICENSE LICENSE2 ./build/Release/ios-deploy "$OUTPUT_DIR"