forked from eatvio/eatvio_app
feat: upd build tf
This commit is contained in:
25
Build-tf
25
Build-tf
@@ -13,25 +13,25 @@ function finish() {
|
||||
|
||||
trap finish EXIT
|
||||
|
||||
SDK="${SDK:-iphoneos}"
|
||||
WORKSPACE="${WORKSPACE:-ios/Runner.xcworkspace}"
|
||||
SCHEME="${SCHEME:-Runner}"
|
||||
CONFIGURATION="${CONFIGURATION:-Release}"
|
||||
SDK="iphoneos"
|
||||
WORKSPACE="ios/Runner.xcworkspace"
|
||||
SCHEME="Runner"
|
||||
CONFIGURATION="Release"
|
||||
|
||||
BUILD_DIR="${BUILD_DIR:-build}"
|
||||
ARTIFACT_PATH="${RESULT_PATH:-${BUILD_DIR}/Artifacts}"
|
||||
BUILD_DIR="build"
|
||||
ARTIFACT_PATH="${BUILD_DIR}/Artifacts"
|
||||
RESULT_BUNDLE_PATH="${ARTIFACT_PATH}/${SCHEME}.xcresult"
|
||||
ARCHIVE_PATH="${ARCHIVE_PATH:-${BUILD_DIR}/Archives/${SCHEME}.xcarchive}"
|
||||
DERIVED_DATA_PATH="${DERIVED_DATA_PATH:-${BUILD_DIR}/DerivedData}"
|
||||
CURRENT_PROJECT_VERSION="${BUILD_NUMBER:-0}"
|
||||
ARCHIVE_PATH="${BUILD_DIR}/Archives/${SCHEME}.xcarchive"
|
||||
DERIVED_DATA_PATH="${BUILD_DIR}/DerivedData"
|
||||
CURRENT_PROJECT_VERSION="1.0.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 ..
|
||||
@@ -39,7 +39,6 @@ cd ..
|
||||
rm -rf "${RESULT_BUNDLE_PATH}"
|
||||
rm -rf "${DERIVED_DATA_PATH}"
|
||||
|
||||
# Archive the build
|
||||
xcrun xcodebuild \
|
||||
-workspace "${WORKSPACE}" \
|
||||
-scheme "${SCHEME}" \
|
||||
@@ -52,15 +51,13 @@ xcrun xcodebuild \
|
||||
-archivePath "${ARCHIVE_PATH}" \
|
||||
-resultBundlePath "${RESULT_BUNDLE_PATH}" \
|
||||
-allowProvisioningUpdates \
|
||||
CURRENT_PROJECT_VERSION="${CURRENT_PROJECT_VERSION}" \
|
||||
-authenticationKeyPath ~/Library/MobileDevice/Provisioning\ Profiles \
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user