diff --git a/jobs/Hi365_iOS/config.xml b/jobs/Hi365_iOS/config.xml
index 19a2bd074b88aab3e0ac3af996b86a193af3d235..11eb48b2fd58b67a323508300da2a91151a20b74 100644
--- a/jobs/Hi365_iOS/config.xml
+++ b/jobs/Hi365_iOS/config.xml
@@ -58,14 +58,19 @@
false
- # security set-key-partition-list -S apple-tool:,apple: -s -k "password" ~/Library/Keychains/login.keychain-db
-project_path=$(pwd)
+ 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
@@ -76,26 +81,33 @@ then
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
+
+# show env 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
+
+# Clean build and deploy
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