forked from eatvio/eatvio_app
Merge pull request 'feat: upd build tf' (#297) from mso7nueh/eatvio_app:main into main
Reviewed-on: eatvio/eatvio_app#297
This commit is contained in:
25
Build-tf
25
Build-tf
@@ -13,25 +13,25 @@ function finish() {
|
|||||||
|
|
||||||
trap finish EXIT
|
trap finish EXIT
|
||||||
|
|
||||||
SDK="${SDK:-iphoneos}"
|
SDK="iphoneos"
|
||||||
WORKSPACE="${WORKSPACE:-ios/Runner.xcworkspace}"
|
WORKSPACE="ios/Runner.xcworkspace"
|
||||||
SCHEME="${SCHEME:-Runner}"
|
SCHEME="Runner"
|
||||||
CONFIGURATION="${CONFIGURATION:-Release}"
|
CONFIGURATION="Release"
|
||||||
|
|
||||||
BUILD_DIR="${BUILD_DIR:-build}"
|
BUILD_DIR="build"
|
||||||
ARTIFACT_PATH="${RESULT_PATH:-${BUILD_DIR}/Artifacts}"
|
ARTIFACT_PATH="${BUILD_DIR}/Artifacts"
|
||||||
RESULT_BUNDLE_PATH="${ARTIFACT_PATH}/${SCHEME}.xcresult"
|
RESULT_BUNDLE_PATH="${ARTIFACT_PATH}/${SCHEME}.xcresult"
|
||||||
ARCHIVE_PATH="${ARCHIVE_PATH:-${BUILD_DIR}/Archives/${SCHEME}.xcarchive}"
|
ARCHIVE_PATH="${BUILD_DIR}/Archives/${SCHEME}.xcarchive"
|
||||||
DERIVED_DATA_PATH="${DERIVED_DATA_PATH:-${BUILD_DIR}/DerivedData}"
|
DERIVED_DATA_PATH="${BUILD_DIR}/DerivedData"
|
||||||
CURRENT_PROJECT_VERSION="${BUILD_NUMBER:-0}"
|
CURRENT_PROJECT_VERSION="1.0.0"
|
||||||
EXPORT_OPTIONS_FILE="Support/ExportOptions.plist"
|
EXPORT_OPTIONS_FILE="Support/ExportOptions.plist"
|
||||||
|
|
||||||
# Clean and prepare the build
|
|
||||||
flutter clean
|
flutter clean
|
||||||
flutter pub get
|
flutter pub get
|
||||||
|
|
||||||
cd ios
|
cd ios
|
||||||
rm -rf Pods Podfile.lock
|
rm -rf Pods Podfile.lock
|
||||||
|
pod deintegrate
|
||||||
pod install --repo-update
|
pod install --repo-update
|
||||||
pod update
|
pod update
|
||||||
cd ..
|
cd ..
|
||||||
@@ -39,7 +39,6 @@ cd ..
|
|||||||
rm -rf "${RESULT_BUNDLE_PATH}"
|
rm -rf "${RESULT_BUNDLE_PATH}"
|
||||||
rm -rf "${DERIVED_DATA_PATH}"
|
rm -rf "${DERIVED_DATA_PATH}"
|
||||||
|
|
||||||
# Archive the build
|
|
||||||
xcrun xcodebuild \
|
xcrun xcodebuild \
|
||||||
-workspace "${WORKSPACE}" \
|
-workspace "${WORKSPACE}" \
|
||||||
-scheme "${SCHEME}" \
|
-scheme "${SCHEME}" \
|
||||||
@@ -52,15 +51,13 @@ xcrun xcodebuild \
|
|||||||
-archivePath "${ARCHIVE_PATH}" \
|
-archivePath "${ARCHIVE_PATH}" \
|
||||||
-resultBundlePath "${RESULT_BUNDLE_PATH}" \
|
-resultBundlePath "${RESULT_BUNDLE_PATH}" \
|
||||||
-allowProvisioningUpdates \
|
-allowProvisioningUpdates \
|
||||||
CURRENT_PROJECT_VERSION="${CURRENT_PROJECT_VERSION}" \
|
-authenticationKeyPath ~/Library/MobileDevice/Provisioning\ Profiles \
|
||||||
archive
|
archive
|
||||||
|
|
||||||
# Export the build to .ipa
|
|
||||||
xcrun xcodebuild \
|
xcrun xcodebuild \
|
||||||
-exportArchive \
|
-exportArchive \
|
||||||
-exportOptionsPlist "${EXPORT_OPTIONS_FILE}" \
|
-exportOptionsPlist "${EXPORT_OPTIONS_FILE}" \
|
||||||
-archivePath "${ARCHIVE_PATH}" \
|
-archivePath "${ARCHIVE_PATH}" \
|
||||||
-exportPath "${ARTIFACT_PATH}/${SCHEME}.ipa"
|
-exportPath "${ARTIFACT_PATH}/${SCHEME}.ipa"
|
||||||
|
|
||||||
# Zip the archive
|
|
||||||
ditto -c -k --sequesterRsrc --keepParent "${ARCHIVE_PATH}" "${ARTIFACT_PATH}/${SCHEME}.xcarchive.zip"
|
ditto -c -k --sequesterRsrc --keepParent "${ARCHIVE_PATH}" "${ARTIFACT_PATH}/${SCHEME}.xcarchive.zip"
|
||||||
|
|||||||
Reference in New Issue
Block a user