Class: Pindo::Command::Appstore::Quswauth
- Inherits:
-
Pindo::Command::Appstore
- Object
- CLAide::Command
- Pindo::Command
- Pindo::Command::Appstore
- Pindo::Command::Appstore::Quswauth
- Defined in:
- lib/pindo/command/appstore/quswauth.rb
Constant Summary
Constants inherited from Pindo::Command
DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS
Instance Attribute Summary
Attributes inherited from Pindo::Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Quswauth
constructor
A new instance of Quswauth.
- #run ⇒ Object
Methods inherited from Pindo::Command
command_name, #initialize_options, run, use_cache?, #validate!
Methods included from Funlog::Mixin
Methods included from Pindoconfig::Mixin
Constructor Details
#initialize(argv) ⇒ Quswauth
Returns a new instance of Quswauth.
36 37 38 39 |
# File 'lib/pindo/command/appstore/quswauth.rb', line 36 def initialize(argv) super @additional_args = argv.remainder! end |
Class Method Details
.options ⇒ Object
30 31 32 33 34 |
# File 'lib/pindo/command/appstore/quswauth.rb', line 30 def self. [ ].concat(super) end |
Instance Method Details
#run ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/pindo/command/appstore/quswauth.rb', line 41 def run project_dir = Dir.pwd config_file = File.join(project_dir, "config.json") # 加载配置 config_parser = Pindo::IosConfigParser.instance config_parser.load_config(config_file: config_file) bundle_id = config_parser.bundle_id if bundle_id.nil? || bundle_id.empty? raise Informative, "无法从配置文件中获取 Bundle ID" end # 调用封装的方法 success = Pindo::XcodeSwarkHelper.(bundle_id: bundle_id) unless success raise Informative, "Swark 授权失败,请检查日志" end end |