diff --git a/jobs/Deploy_Hi365_IOS_SIT/config.xml b/jobs/Deploy_Hi365_IOS_SIT/config.xml index 98804e30719b9893450fd45071c7bf60a8966570..e5ba07de9ac24f543080a361b9188db0d0552ad4 100644 --- a/jobs/Deploy_Hi365_IOS_SIT/config.xml +++ b/jobs/Deploy_Hi365_IOS_SIT/config.xml @@ -63,18 +63,10 @@ false - # Choose build dart by environment -default_doc="main_sit.dart" -export_method="app-store" -version_number=$Version_Number + export FLUTTER_ROOT="/Users/jenkins/flutter" -export FLUTTER_ROOT="/Users/jenkins/flutter" - -# Set the variable project_path=$(pwd) -flutter build ios --release -t lib/${default_doc} --no-codesign - cd $project_path/ios now=$(date +"%Y_%m_%d_%H:%M") @@ -85,44 +77,22 @@ app_version=$(grep 'version:' ${project_path}/pubspec.yaml | cut -d &a git_short_hash=$(git rev-parse --short HEAD) -scheme="Runner" - -# package configuration for fastlane -configuration="Release" - -# 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 name ipa_name="Hi365_SIT_${current_date}_${version_number}_${git_short_hash}.ipa" -# ipa export path -ipa_path="$output_path/${ipa_name}" - -# 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===" +ipa_full_path="${$project_path}/ios/Hi365_SIT_${current_date}_${version_number}_${git_short_hash}.ipa" # Temporarily change xcode versino for fastlane fastlane run xcversion version:"11" -# Unlock keychain -security unlock-keychain -p "Yonglinit123" ~/Library/Keychains/login.keychain -# 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} +# build ips +fastlane sit + +# rename ipa to a identified one +mv Runner.ipa ${ipa_name} + +# deploy echo "Deploy to IPA repository" -scp -i ~/jenkins/jenkins ${ipa_path} appuploader@10.57.117.135:~/app/Hi365/${ipa_name} +scp -i ~/jenkins/jenkins ${ipa_full_path} appuploader@10.57.117.135:~/app/Hi365/${ipa_name}