From 29b29b406366249f120180f829bd976c425eb2e1 Mon Sep 17 00:00:00 2001 From: "YM-RD-AP01\\ymadmin" Date: Wed, 11 Sep 2019 08:57:10 +0800 Subject: [PATCH] 20180082: Job [Hi365_iOS] configuration updated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change performed by ³¯¾_¶§ --- jobs/Hi365_iOS/config.xml | 44 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/jobs/Hi365_iOS/config.xml b/jobs/Hi365_iOS/config.xml index 62a6597b..19a2bd07 100644 --- a/jobs/Hi365_iOS/config.xml +++ b/jobs/Hi365_iOS/config.xml @@ -59,8 +59,48 @@ # security set-key-partition-list -S apple-tool:,apple: -s -k "password" ~/Library/Keychains/login.keychain-db -# This is step is prerequisite, otherwise it will cause IPA run hangs on blank -flutter build ios --release +project_path=$(pwd) +flutter build ios +cd $project_path/ios +now=$(date +"%Y_%m_%d_%H:%M") +scheme="Runner" +# package configuration for fastlane +configuration=${BUILD_TYPE} +# export methods supports app-store, package, ad-hoc, enterprise, development, 和developer-id,即xcodebuild的method引數 +if [ $BUILD_TYPE == "Release" ] +then + export_method="app-store" +elif [ $BUILD_TYPE == "AdHoc" ] +then + export_method="ad-hoc" +else + export_method="development" +fi +# iOS project path +workspace_path="${project_path}/ios/Runner.xcodeproj" +# ipa export folder +rm -rf "${project_path}/ipa" +mkdir -p "${project_path}/ipa" +output_path="${project_path}/ipa" +# project archive path +archive_path="$output_path/hi365_${export_method}_${now}.xcarchive" +# ipa export path +ipa_path="$output_path/hi365_${BUILD_TYPE}_${BUILD_BRANCH}_${BUILD_REPOSITORY}_${now}.ipa" +# ipa name +ipa_name="Hi365_${BUILD_TYPE}_${BUILD_BRANCH}_${now}.ipa" +commit_msg="$1" +# Show settings +echo "===workspace path: ${workspace_path}===" +echo "===archive path: ${archive_path}===" +echo "===ipa path: ${ipa_path}===" +echo "===export method: ${export_method}===" +echo "===commit msg: $1===" +# Clean build +fastlane gym --scheme ${scheme} --clean --configuration ${configuration} --archive_path ${archive_path} --export_method ${export_method} --output_directory ${output_path} --output_name ${ipa_name} +if [ ${export_method} != "app-store" ] +then +echo "TODO: Publish to a place where user can download" +fi -- 2.26.2