Commit 29b29b40 authored by YM-RD-AP01\ymadmin's avatar YM-RD-AP01\ymadmin

20180082: Job [Hi365_iOS] configuration updated

Change performed by ³¯¾_¶§
parent df5ebcf0
......@@ -59,8 +59,48 @@
<builders>
<hudson.tasks.Shell>
<command># security set-key-partition-list -S apple-tool:,apple: -s -k &quot;password&quot; ~/Library/Keychains/login.keychain-db
# This is step is prerequisite, otherwise it will cause IPA run hangs on blank
flutter build ios --release</command>
project_path=$(pwd)
flutter build ios
cd $project_path/ios
now=$(date +&quot;%Y_%m_%d_%H:%M&quot;)
scheme=&quot;Runner&quot;
# package configuration for fastlane
configuration=${BUILD_TYPE}
# export methods supports app-store, package, ad-hoc, enterprise, development, 和developer-id,即xcodebuild的method引數
if [ $BUILD_TYPE == &quot;Release&quot; ]
then
export_method=&quot;app-store&quot;
elif [ $BUILD_TYPE == &quot;AdHoc&quot; ]
then
export_method=&quot;ad-hoc&quot;
else
export_method=&quot;development&quot;
fi
# iOS project path
workspace_path=&quot;${project_path}/ios/Runner.xcodeproj&quot;
# ipa export folder
rm -rf &quot;${project_path}/ipa&quot;
mkdir -p &quot;${project_path}/ipa&quot;
output_path=&quot;${project_path}/ipa&quot;
# project archive path
archive_path=&quot;$output_path/hi365_${export_method}_${now}.xcarchive&quot;
# ipa export path
ipa_path=&quot;$output_path/hi365_${BUILD_TYPE}_${BUILD_BRANCH}_${BUILD_REPOSITORY}_${now}.ipa&quot;
# ipa name
ipa_name=&quot;Hi365_${BUILD_TYPE}_${BUILD_BRANCH}_${now}.ipa&quot;
commit_msg=&quot;$1&quot;
# Show settings
echo &quot;===workspace path: ${workspace_path}===&quot;
echo &quot;===archive path: ${archive_path}===&quot;
echo &quot;===ipa path: ${ipa_path}===&quot;
echo &quot;===export method: ${export_method}===&quot;
echo &quot;===commit msg: $1===&quot;
# 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} != &quot;app-store&quot; ]
then
echo &quot;TODO: Publish to a place where user can download&quot;
fi</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment