fix:增加android构建日志
This commit is contained in:
parent
aa6f01ad5c
commit
7dde0cdf8e
@ -20,6 +20,10 @@ elif [[ $ENV_BUILD_TAG =~ $regex ]]; then
|
||||
bundle exec fastlane release_apk flavor:sky --verbose || { echo "[FATAL] fastlane release_apk sky 失败"; exit 11; }
|
||||
bundle exec fastlane release_bundle flavor:xhj_bundle --verbose || { echo "[FATAL] fastlane release_bundle xhj_bundle 失败"; exit 12; }
|
||||
bundle exec fastlane release_bundle flavor:sky --verbose || { echo "[FATAL] fastlane release_bundle sky 失败"; exit 13; }
|
||||
if [ ! -d build/app/outputs/flutter-apk/ ]; then
|
||||
echo "❌ 产物目录 build/app/outputs/flutter-apk/ 未生成,构建失败!"
|
||||
exit 99
|
||||
fi
|
||||
ls -l build/app/outputs/flutter-apk/
|
||||
elif [[ "${ENV_BUILD_BRANCH}" == "develop" ]]; then
|
||||
echo "===build dev===${NEXT_VERSION}"
|
||||
|
||||
@ -95,6 +95,9 @@ platform :android do
|
||||
new_file_path = File.join($path_apk_output_dir, "starlock-sky-preview-#{build_version}.apk")
|
||||
print_log "old_file_path: #{old_file_path}"
|
||||
print_log "new_file_path: #{new_file_path}"
|
||||
unless File.exist?(old_file_path)
|
||||
UI.user_error!("❌ 产物 #{old_file_path} 未生成,构建失败!")
|
||||
end
|
||||
File.rename(old_file_path, new_file_path)
|
||||
logs = changelog_from_git_commits(
|
||||
pretty: '- %s (%cn)',
|
||||
@ -136,6 +139,9 @@ platform :android do
|
||||
new_apk_file_path = File.join($path_apk_output_dir, "starlock-sky-release-"+$current_tag+".apk")
|
||||
print_log "old_apk_file_path: #{old_apk_file_path}"
|
||||
print_log "new_apk_file_path: #{new_apk_file_path}"
|
||||
unless File.exist?(old_apk_file_path)
|
||||
UI.user_error!("❌ 产物 #{old_apk_file_path} 未生成,构建失败!")
|
||||
end
|
||||
File.rename(old_apk_file_path, new_apk_file_path)
|
||||
end
|
||||
|
||||
@ -171,7 +177,13 @@ platform :android do
|
||||
new_bundle_file_path = File.join($path_bundle_output_dir , "/skyRelease/starlock-sky-release-"+$current_tag+".aab")
|
||||
print_log "old_bundle_file_path: #{old_bundle_file_path}"
|
||||
print_log "new_bundle_file_path: #{new_bundle_file_path}"
|
||||
unless File.exist?(old_bundle_file_path)
|
||||
UI.user_error!("❌ 产物 #{old_bundle_file_path} 未生成,构建失败!")
|
||||
end
|
||||
File.rename(old_bundle_file_path, new_bundle_file_path)
|
||||
unless File.exist?(new_bundle_file_path)
|
||||
UI.user_error!("❌ 产物 #{new_bundle_file_path} 未生成,构建失败!")
|
||||
end
|
||||
sh('cp',new_bundle_file_path,$path_apk_output_dir)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user