From 7b4d5883ebe920b6bef12170221078a49589dd93 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Wed, 28 Oct 2020 23:38:50 +0800 Subject: [PATCH] Fix build for iOS for local simulator and Android test (#4923) * fix build for iOS for local simulator and Android test * delete /build-ios in local * remove comment --- detox/.detoxrc.json | 4 ++-- fastlane/Fastfile | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/detox/.detoxrc.json b/detox/.detoxrc.json index 4d2ddbfb0..b06510e09 100644 --- a/detox/.detoxrc.json +++ b/detox/.detoxrc.json @@ -20,7 +20,7 @@ "android.emu.debug": { "type": "android.emulator", "binaryPath": "../android/app/build/outputs/apk/debug/app-debug.apk", - "build": "cd ../android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ../detox", + "build": "cd .. && ./node_modules/.bin/jetify && cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ../detox", "device": { "avdName": "detox_emu_api_30" } @@ -28,7 +28,7 @@ "android.emu.release": { "type": "android.emulator", "binaryPath": "../android/app/build/outputs/apk/release/app-release.apk", - "build": "cd ../android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ../detox", + "build": "cd .. && ./node_modules/.bin/jetify && cd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && cd ../detox", "device": { "avdName": "detox_emu_api_30" } diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 4a9fffe51..f4acd8330 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -355,11 +355,15 @@ platform :ios do ENV['REPLACE_ASSETS'] = 'true' ENV['BUILD_FOR_RELEASE'] = 'true' ENV['APP_SCHEME'] = 'mattermost' - data_path = 'build-ios' update_identifiers replace_assets + data_path = 'ios' + if ENV['CIRCLECI'] == 'true' + data_path = 'build-ios' + end + sh 'rm -rf ../build-ios/' sh 'cd ../ios && xcodebuild -workspace Mattermost.xcworkspace -scheme Mattermost -arch x86_64 -sdk iphonesimulator -configuration Release -parallelizeTargets -derivedDataPath ../build-ios ENABLE_BITCODE=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ENABLE_BITCODE=NO' sh "cd ../#{data_path}/Build/Products/Release-iphonesimulator && zip -r Mattermost-simulator-x86_64.app.zip Mattermost.app"