feat: export options

This commit is contained in:
mso7nueh
2025-03-19 11:21:46 +03:00
parent ebf15bdf3c
commit 186f1f40e5
2 changed files with 15 additions and 13 deletions

View File

@@ -13,32 +13,32 @@ function finish() {
trap finish EXIT
SDK="iphoneos"
WORKSPACE="ios/Runner.xcworkspace"
SCHEME="Runner"
CONFIGURATION="Release"
SDK="${SDK:-iphoneos}"
WORKSPACE="${WORKSPACE:-ios/Runner.xcworkspace}"
SCHEME="${SCHEME:-Runner}"
CONFIGURATION="${CONFIGURATION:-Release}"
BUILD_DIR="build"
ARTIFACT_PATH="${BUILD_DIR}/Artifacts"
BUILD_DIR="${BUILD_DIR:-build}"
ARTIFACT_PATH="${RESULT_PATH:-${BUILD_DIR}/Artifacts}"
RESULT_BUNDLE_PATH="${ARTIFACT_PATH}/${SCHEME}.xcresult"
ARCHIVE_PATH="${BUILD_DIR}/Archives/${SCHEME}.xcarchive"
DERIVED_DATA_PATH="${BUILD_DIR}/DerivedData"
CURRENT_PROJECT_VERSION="1.0.0"
ARCHIVE_PATH="${ARCHIVE_PATH:-${BUILD_DIR}/Archives/${SCHEME}.xcarchive}"
DERIVED_DATA_PATH="${DERIVED_DATA_PATH:-${BUILD_DIR}/DerivedData}"
CURRENT_PROJECT_VERSION="${BUILD_NUMBER:-0}"
EXPORT_OPTIONS_FILE="Support/ExportOptions.plist"
# Clean and prepare the build
flutter clean
flutter pub get
cd ios
rm -rf Pods Podfile.lock
pod deintegrate
pod install --repo-update
pod update
cd ..
rm -rf "${RESULT_BUNDLE_PATH}"
rm -rf "${DERIVED_DATA_PATH}"
# Archive the build
xcrun xcodebuild \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
@@ -51,13 +51,15 @@ xcrun xcodebuild \
-archivePath "${ARCHIVE_PATH}" \
-resultBundlePath "${RESULT_BUNDLE_PATH}" \
-allowProvisioningUpdates \
-authenticationKeyPath ~/Library/MobileDevice/Provisioning\ Profiles \
CURRENT_PROJECT_VERSION="${CURRENT_PROJECT_VERSION}" \
archive
# Export the build to .ipa
xcrun xcodebuild \
-exportArchive \
-exportOptionsPlist "${EXPORT_OPTIONS_FILE}" \
-archivePath "${ARCHIVE_PATH}" \
-exportPath "${ARTIFACT_PATH}/${SCHEME}.ipa"
# Zip the archive
ditto -c -k --sequesterRsrc --keepParent "${ARCHIVE_PATH}" "${ARTIFACT_PATH}/${SCHEME}.xcarchive.zip"

View File

@@ -11,7 +11,7 @@
<key>provisioningProfiles</key>
<dict>
<key>com.eatvioapp.app</key>
<string>EatvioApp</string>
<string>Eatvio distribution profile</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution</string>