Class: Pindo::TaskSystem::AppStoreUploadIpaTask
- Inherits:
-
AppStoreTask
- Object
- PindoTask
- AppStoreTask
- Pindo::TaskSystem::AppStoreUploadIpaTask
- Defined in:
- lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb
Overview
App Store IPA 上传任务上传 IPA 文件到 App Store Connect
Instance Attribute Summary collapse
-
#ipa_file ⇒ Object
readonly
Returns the value of attribute ipa_file.
-
#ipa_path ⇒ Object
readonly
Returns the value of attribute ipa_path.
Attributes inherited from PindoTask
#callbacks_setup, #context, #created_at, #dependencies, #error, #finished_at, #id, #max_retry_count, #metadata, #name, #priority, #result, #retry_count, #retry_delay, #retry_mode, #started_at, #status, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ipa_path, ipa_file = nil, options = {}) ⇒ AppStoreUploadIpaTask
constructor
初始化 IPA 上传任务.
- #validate ⇒ Object
Methods inherited from AppStoreTask
Methods inherited from PindoTask
#before_retry, #cancel, #cancelled?, #check_cancelled!, #do_task, #execution_time, #finished?, #on, #reset_for_retry, #retryable?, #running?, #should_retry?, task_type
Constructor Details
#initialize(ipa_path, ipa_file = nil, options = {}) ⇒ AppStoreUploadIpaTask
初始化 IPA 上传任务
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb', line 33 def initialize(ipa_path, ipa_file = nil, = {}) @ipa_path = ipa_path # 搜索 IPA 文件的路径 @ipa_file = ipa_file # 要上传的 IPA 文件(nil 表示自动查找) # App Store Connect 配置 @apple_id = [:apple_id] @app_password = [:app_password] @bundle_id = [:bundle_id] @skip_validation = [:skip_validation] || false @platform = [:platform] || 'ios' # 设置上传任务的优先级为 LOW,确保在构建任务之后执行 [:priority] ||= TaskPriority::LOW super("上传 IPA 到 App Store", ) end |
Instance Attribute Details
#ipa_file ⇒ Object (readonly)
Returns the value of attribute ipa_file.
9 10 11 |
# File 'lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb', line 9 def ipa_file @ipa_file end |
#ipa_path ⇒ Object (readonly)
Returns the value of attribute ipa_path.
9 10 11 |
# File 'lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb', line 9 def ipa_path @ipa_path end |
Class Method Details
.default_retry_count ⇒ Object
16 17 18 |
# File 'lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb', line 16 def self.default_retry_count 3 # 默认可以重试 3 次 end |
.default_retry_delay ⇒ Object
20 21 22 |
# File 'lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb', line 20 def self.default_retry_delay 30 # 默认延迟 30 秒(App Store 上传较慢) end |
Instance Method Details
#validate ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/pindo/module/task/model/appstore/appstore_upload_ipa_task.rb', line 50 def validate # 验证基本参数 unless @ipa_path && !@ipa_path.empty? @error = "缺少必需参数: ipa_path" return false end # IPA 文件会在 do_work 中查找,这里不验证 true end |