Class: Pindo::Command::Jps::Config
- Inherits:
-
Jps
- Object
- Jps
- Pindo::Command::Jps::Config
- Defined in:
- lib/pindo/command/jps/config.rb
Constant Summary collapse
- WORKFLOW_TYPES =
工作流类型定义表(key、显示名、package_type、manage_type、配置文件中的 workflow_key)
[ { key: 'ipa', name: 'iOS IPA', package_type: 'ipa', manage_type: '', workflow_key: 'ipa_workflow' }, { key: 'apk', name: 'Android APK', package_type: 'apk', manage_type: '', workflow_key: 'apk_workflow' }, { key: 'zip', name: 'WebGL', package_type: 'zip', manage_type: '', workflow_key: 'webgl_workflow' }, { key: 'mac', name: 'macOS', package_type: 'mac', manage_type: '', workflow_key: 'macos_workflow' }, { key: 'exe', name: 'Windows', package_type: 'exe', manage_type: '', workflow_key: 'win_workflow' }, { key: 'git', name: 'Git 提交', package_type: nil, manage_type: 'git', workflow_key: 'git_workflow' } ].freeze
- DIVIDER =
('━' * 60).freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Config
constructor
A new instance of Config.
- #run ⇒ Object
- #validate! ⇒ Object
Constructor Details
#initialize(argv) ⇒ Config
Returns a new instance of Config.
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/pindo/command/jps/config.rb', line 66 def initialize(argv) @options = (argv) @args_conf = @options[:conf] @args_type = parse_type_option(@options[:type]) @args_clean = @options[:clean] || false @args_proj = @options[:proj] @args_workflow_name = @options[:workflow_name] super(argv) end |
Class Method Details
.option_items ⇒ Object
58 59 60 |
# File 'lib/pindo/command/jps/config.rb', line 58 def self.option_items @option_items ||= Pindo::Options::JPSOptions.select(:conf, :type, :clean, :proj, :workflow_name) end |
.options ⇒ Object
62 63 64 |
# File 'lib/pindo/command/jps/config.rb', line 62 def self. option_items.map(&:to_claide_option).concat(super) end |
Instance Method Details
#run ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/pindo/command/jps/config.rb', line 82 def run if @args_clean run_clean else run_config end end |
#validate! ⇒ Object
78 79 80 |
# File 'lib/pindo/command/jps/config.rb', line 78 def validate! super end |