Class: Fastlane::Actions::CustomMatchAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::CustomMatchAction
- Defined in:
- lib/fastlane/plugin/stream_actions/actions/custom_match.rb
Documentation collapse
Class Method Summary collapse
Class Method Details
.available_options ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/fastlane/plugin/stream_actions/actions/custom_match.rb', line 31 def self. [ FastlaneCore::ConfigItem.new( key: :api_key, description: 'AppStore Connect API Key', is_string: false, verify_block: proc do |api_key| UI.user_error!('AppStore Connect API Key has to be specified') if api_key.nil? || api_key.empty? || !api_key.kind_of?(Hash) end ), FastlaneCore::ConfigItem.new( key: :app_identifier, description: 'The bundle identifier(s) of your app (array of strings)', is_string: false, verify_block: proc do |id| UI.user_error!("The bundle identifier(s) have to be specified") unless id.kind_of?(Array) && id.size.positive? end ), FastlaneCore::ConfigItem.new( key: :readonly, is_string: false, default_value: true, description: 'If `readonly: true` (by default), installs all Certs and Profiles necessary for development and ad-hoc.\nIf `readonly: false`, recreates all Profiles necessary for development and ad-hoc, updates them locally and remotely' ), FastlaneCore::ConfigItem.new( key: :register_device, is_string: false, default_value: false, description: 'When `true` you will be asked to specify a name and UDID of new device to register' ) ] end |
.description ⇒ Object
27 28 29 |
# File 'lib/fastlane/plugin/stream_actions/actions/custom_match.rb', line 27 def self.description 'Installs or recreates all Certs and Profiles necessary for development and ad-hoc and registers a new device if required' end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fastlane/plugin/stream_actions/actions/custom_match.rb', line 4 def self.run(params) if params[:register_device] device_name = other_action.prompt(text: 'Enter the device name: ') device_udid = other_action.prompt(text: 'Enter the device UDID: ') other_action.register_device(name: device_name, udid: device_udid) params[:readonly] = false end %w[development adhoc appstore].each do |type| other_action.match( api_key: params[:api_key], type: type, app_identifier: params[:app_identifier], readonly: params[:readonly], force_for_new_devices: !other_action.is_ci ) end end |
.supported?(_platform) ⇒ Boolean
64 65 66 |
# File 'lib/fastlane/plugin/stream_actions/actions/custom_match.rb', line 64 def self.supported?(_platform) [:ios].include?(platform) end |