From 6574766149774b69d55ceb64cd235b51ab483f98 Mon Sep 17 00:00:00 2001 From: wangzhitong Date: Wed, 27 Mar 2024 10:54:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98=E6=A8=A1=E5=9D=97=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=87=AA=E5=8A=A8=E5=86=99=E5=85=A5=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FindLargeFiles.sh | 21 +++++++++++++++++++++ HelloUniMPDemo/Podfile | 32 +++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 FindLargeFiles.sh diff --git a/FindLargeFiles.sh b/FindLargeFiles.sh new file mode 100644 index 0000000..f3424e1 --- /dev/null +++ b/FindLargeFiles.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +add_large_files_to_lfs() { + local directory="$1" + + for file in "$directory"/*; do + if [ -f "$file" ]; then + file_size=$(stat -f %z "$file") + + if [ "$file_size" -gt $((5 * 1024 * 1024)) ]; then + git lfs track "$file" + fi + elif [ -d "$file" ]; then + add_large_files_to_lfs "$file" # 递归调用,继续查找子目录 + fi + done +} + +directory_path="UniMPSDK" +# 添加大文件到 Git LFS +add_large_files_to_lfs "$directory_path" diff --git a/HelloUniMPDemo/Podfile b/HelloUniMPDemo/Podfile index 59f79d4..a02b905 100644 --- a/HelloUniMPDemo/Podfile +++ b/HelloUniMPDemo/Podfile @@ -65,6 +65,36 @@ target 'HelloUniMPDemo' do # pod 'FBSDKLoginKit','16.2.1' ##使用Oauth-Facebook 时需添加该库 # pod 'Stripe','23.18.2' ##使用Payment-Stripe 时需添加该库 # pod 'PayPalCheckout','1.2.0' ##使用Payment-Paypal 时需添加该库 - + +# 如果添加了支付模块 请添加如下脚本 +# post_install do |installer| +# project_root = installer.sandbox.root +# featurePlist_PATH = File.join(project_root, 'unimp/UniMPSDK/Core/Resources/PandoraApi.bundle/feature.plist') +# spec_names = { +# 'unimp/Payment-IAP' => 'Add :Payment:extend:appleiap string PGPlatbyIAP', +# 'unimp/Payment-AliPay' => 'Add :Payment:extend:alix string PGAlixPay', +# 'unimp/Payment-Wechat' => 'Add :Payment:extend:weixin string PGWXPay', +# 'unimp/Payment-Stripe' => 'Add :Payment:extend:stripe string PGStripePay', +# 'unimp/Payment-Paypal' => 'Add :Payment:extend:paypal string PGPaypalPay' +# } +# has_specs = Hash.new(false) +# installer.pod_targets.each do |target| +# if target.name == 'unimp' +# target.specs.each do |spec| +# has_specs[spec.name] = true if spec_names.key?(spec.name) +# end +# end +# end +# has_specs.each do |spec_name, has| +# if has == true +# str = spec_names[spec_name] +# system("/usr/libexec/PlistBuddy -c '#{str}' #{featurePlist_PATH}") +# end +# end +# end end + + + + -- GitLab