Class: Fastlane::Actions::AddDevelopmentCertificatesToProvisioningProfilesAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::AddDevelopmentCertificatesToProvisioningProfilesAction
- Defined in:
- lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb
Documentation collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .output ⇒ Object
- .return_value ⇒ Object
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
69 70 71 72 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 69 def self. # So no one will ever forget your contribution to fastlane :) You are awesome btw! ['Automattic'] end |
.available_options ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 44 def self. [ FastlaneCore::ConfigItem.new(key: :app_identifier, description: 'List of App Identifiers that should contain the new device identifier', type: Array, verify_block: proc do |value| UI.user_error!('You must provide an array of bundle identifiers in `app_identifier`') if value.empty? end), FastlaneCore::ConfigItem.new(key: :team_id, description: 'The team_id for the provisioning profiles', type: String, verify_block: proc do |value| UI.user_error!('You must provide a team ID in `team_id`') unless value && !value.empty? end), ] end |
.description ⇒ Object
36 37 38 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 36 def self.description 'Add dev certificates to provisioning profiles' end |
.details ⇒ Object
40 41 42 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 40 def self.details "Add all team member's development certificates to profiles associated with the provided bundle identifiers" end |
.is_supported?(platform) ⇒ Boolean
74 75 76 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 74 def self.is_supported?(platform) platform == :ios end |
.output ⇒ Object
61 62 63 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 61 def self.output # This lane doesn't provide variables that other lanes can consume. end |
.return_value ⇒ Object
65 66 67 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 65 def self.return_value # If your method provides a return value, you can describe here what it does end |
.run(params) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb', line 6 def self.run(params) require 'spaceship' Spaceship.login Spaceship.select_team(team_id: params[:team_id]) all_certificates = Spaceship.certificate.all(mac: false).select do |certificate| certificate.owner_type == 'teamMember' end params[:app_identifier].each do |identifier| Spaceship.provisioning_profile.find_by_bundle_id(bundle_id: identifier) .select do |profile| profile.is_a? Spaceship::Portal::ProvisioningProfile::Development end .tap do |profiles| UI.important "Warning: Unable to find any profiles associated with #{identifier}" if profiles.empty? end .each do |profile| profile.certificates = all_certificates profile.update! UI.success "Applied #{all_certificates.length} certificates to #{profile.name}" end end end |