#!/bin/sh # Fail this script if any subcommand fails. set -e # The default execution directory of this script is the ci_scripts directory. cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned repo. # Install Flutter using git. git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter export PATH="$PATH:$HOME/flutter/bin" # Enable Swift Package Manager support. flutter config --enable-swift-package-manager # Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms. flutter precache --ios # Install Flutter dependencies. flutter pub get # Regenerate the generated Swift package manifest so its iOS deployment target # matches the Runner project before Xcode resolves packages. flutter build ios --config-only --release # Create .env file with required environment variables cat > .env << EOL VIDEO_SERVICE_URL=https://video.sprk.so SPRK_APPVIEW_URL=https://api.sprk.so MESSAGES_SERVICE_URL=https://api.sprk.chat SHOWCASES_LICENSE_FLUTTER=$SHOWCASES_LICENSE_FLUTTER EOL flutter doctor exit 0