Class: Fastlane::Actions::GetProvisioningProfileAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::GetProvisioningProfileAction
- Defined in:
- fastlane/lib/fastlane/actions/get_provisioning_profile.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Fastlane::Action
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary collapse
- .author ⇒ Object
- .available_options ⇒ Object
- .category ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
-
.output ⇒ Object
rubocop:disable Lint/MissingKeysOnSharedArea.
- .return_type ⇒ Object
- .return_value ⇒ Object
- .run(values) ⇒ Object
- .set_profile_type(values, enterprise) ⇒ Object
Methods inherited from Fastlane::Action
action_name, authors, deprecated_notes, lane_context, method_missing, other_action, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.author ⇒ Object
56 57 58 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 56 def self. "KrauseFx" end |
.available_options ⇒ Object
83 84 85 86 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 83 def self. require 'sigh' Sigh::Options. end |
.category ⇒ Object
104 105 106 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 104 def self.category :code_signing end |
.description ⇒ Object
52 53 54 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 52 def self.description "Generates a provisioning profile, saving it in the current folder (via _sigh_)" end |
.details ⇒ Object
79 80 81 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 79 def self.details "**Note**: It is recommended to use [match](https://docs.fastlane.tools/actions/match/) according to the [codesigning.guide](https://codesigning.guide) for generating and maintaining your provisioning profiles. Use _sigh_ directly only if you want full control over what's going on and know more about codesigning." end |
.example_code ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 92 def self.example_code [ 'get_provisioning_profile', 'sigh # alias for "get_provisioning_profile"', 'get_provisioning_profile( adhoc: true, force: true, filename: "myFile.mobileprovision" )' ] end |
.is_supported?(platform) ⇒ Boolean
88 89 90 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 88 def self.is_supported?(platform) [:ios, :mac].include?(platform) end |
.output ⇒ Object
rubocop:disable Lint/MissingKeysOnSharedArea
61 62 63 64 65 66 67 68 69 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 61 def self.output [ ['SIGH_PROFILE_PATH', 'A path in which certificates, key and profile are exported'], ['SIGH_PROFILE_PATHS', 'Paths in which certificates, key and profile are exported'], ['SIGH_UUID', 'UUID (Universally Unique IDentifier) of a provisioning profile'], ['SIGH_NAME', 'The name of the profile'], ['SIGH_PROFILE_TYPE', 'The profile type, can be app-store, ad-hoc, development, enterprise, developer-id, can be used in `build_app` as a default value for `export_method`'] ] end |
.return_type ⇒ Object
75 76 77 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 75 def self.return_type :string end |
.return_value ⇒ Object
71 72 73 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 71 def self.return_value "The UUID of the profile sigh just fetched/generated" end |
.run(values) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 13 def self.run(values) require 'sigh' require 'credentials_manager/appfile_config' # Only set :api_key from SharedValues if :api_key_path isn't set (conflicting options) unless values[:api_key_path] values[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY] end Sigh.config = values # we already have the finished config path = Sigh::Manager.start Actions.lane_context[SharedValues::SIGH_PROFILE_PATH] = path # absolute path Actions.lane_context[SharedValues::SIGH_PROFILE_PATHS] ||= [] Actions.lane_context[SharedValues::SIGH_PROFILE_PATHS] << path uuid = ENV["SIGH_UUID"] || ENV["SIGH_UDID"] # the UUID of the profile name = ENV["SIGH_NAME"] # the name of the profile Actions.lane_context[SharedValues::SIGH_UUID] = Actions.lane_context[SharedValues::SIGH_UDID] = uuid if uuid Actions.lane_context[SharedValues::SIGH_NAME] = Actions.lane_context[SharedValues::SIGH_NAME] = name if name set_profile_type(values, ENV["SIGH_PROFILE_ENTERPRISE"]) return uuid # returs uuid of profile end |
.set_profile_type(values, enterprise) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 |
# File 'fastlane/lib/fastlane/actions/get_provisioning_profile.rb', line 40 def self.set_profile_type(values, enterprise) profile_type = "app-store" profile_type = "ad-hoc" if values[:adhoc] profile_type = "development" if values[:development] profile_type = "developer-id" if values[:developer_id] profile_type = "enterprise" if enterprise UI.("Setting Provisioning Profile type to '#{profile_type}'") Actions.lane_context[SharedValues::SIGH_PROFILE_TYPE] = profile_type end |