Class: Pindo::Command::Env::Swarkenv

Inherits:
Pindo::Command::Env show all
Defined in:
lib/pindo/command/env/swarkenv.rb

Constant Summary

Constants inherited from Pindo::Command

DEFAULT_OPTIONS, DEFAULT_ROOT_OPTIONS

Instance Attribute Summary

Attributes inherited from Pindo::Command

#args_help_flag

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pindo::Command

command_name, #initialize_options, run, use_cache?

Methods included from Funlog::Mixin

#pindo_log_instance

Methods included from Pindoconfig::Mixin

#pindo_single_config

Constructor Details

#initialize(argv) ⇒ Swarkenv

Returns a new instance of Swarkenv.



41
42
43
44
# File 'lib/pindo/command/env/swarkenv.rb', line 41

def initialize(argv)
    super(argv)
    @additional_args = argv.remainder!
end

Class Method Details

.optionsObject



35
36
37
38
39
# File 'lib/pindo/command/env/swarkenv.rb', line 35

def self.options
  [
        
  ].concat(super)
end

Instance Method Details

#runObject



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/pindo/command/env/swarkenv.rb', line 50

def run
    require 'pindo/module/xcode/xcode_swark_helper'

    pindo_dir = pindo_single_config.pindo_dir
    swark_git_url = pindo_single_config.deploy_swark_giturl

    # 使用封装的方法配置 Swark 环境
    success = Pindo::XcodeSwarkHelper.setup_swark_env(
        pindo_dir: pindo_dir,
        swark_git_url: swark_git_url
    )

    unless success
        raise Informative, "Swark 环境配置失败,请检查日志"
    end
end

#validate!Object



46
47
48
# File 'lib/pindo/command/env/swarkenv.rb', line 46

def validate!
    super
end