class Fastlane::Actions::SyncCodeSigningAction
Public Class Methods
available_options()
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 77 def self.available_options require 'match' Match::Options.available_options end
category()
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 109 def self.category :code_signing end
define_profile_type(params)
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 25 def self.define_profile_type(params) profile_type = "app-store" profile_type = "ad-hoc" if params[:type] == 'adhoc' profile_type = "development" if params[:type] == 'development' profile_type = "enterprise" if params[:type] == 'enterprise' UI.message("Setting Provisioning Profile type to '#{profile_type}'") Actions.lane_context[SharedValues::SIGH_PROFILE_TYPE] = profile_type end
define_provisioning_profile_mapping(params)
click to toggle source
Maps the bundle identifier to the appropriate provisioning profile This is used in the gym action as part of the export options e.g.
export_options: { provisioningProfiles: { "me.themoji.app.beta": "match AppStore me.themoji.app.beta" } }
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 44 def self.define_provisioning_profile_mapping(params) mapping = Actions.lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] || {} # Array (...) to make sure it's an Array, Ruby is magic, try this # Array(1) # => [1] # Array([1, 2]) # => [1, 2] Array(params[:app_identifier]).each do |app_identifier| env_variable_name = Match::Utils.environment_variable_name_profile_name(app_identifier: app_identifier, type: Match.profile_type_sym(params[:type]), platform: params[:platform]) if params[:derive_catalyst_app_identifier] app_identifier = "maccatalyst.#{app_identifier}" end mapping[app_identifier] = ENV[env_variable_name] end Actions.lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING] = mapping end
description()
click to toggle source
@!group Documentation
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 69 def self.description "Easily sync your certificates and profiles across your team (via _match_)" end
details()
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 73 def self.details "More information: https://docs.fastlane.tools/actions/match/" end
example_code()
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 100 def self.example_code [ 'sync_code_signing(type: "appstore", app_identifier: "tools.fastlane.app")', 'sync_code_signing(type: "development", readonly: true)', 'sync_code_signing(app_identifier: ["tools.fastlane.app", "tools.fastlane.sleepy"])', 'match # alias for "sync_code_signing"' ] end
is_supported?(platform)
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 96 def self.is_supported?(platform) [:ios, :mac].include?(platform) end
output()
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 82 def self.output [ ['MATCH_PROVISIONING_PROFILE_MAPPING', 'The match provisioning profile mapping'], ['SIGH_PROFILE_TYPE', 'The profile type, can be app-store, ad-hoc, development, enterprise, can be used in `build_app` as a default value for `export_method`'] ] end
return_value()
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 89 def self.return_value end
run(params)
click to toggle source
# File fastlane/lib/fastlane/actions/sync_code_signing.rb, line 9 def self.run(params) require 'match' params.load_configuration_file("Matchfile") # Only set :api_key from SharedValues if :api_key_path isn't set (conflicting options) unless params[:api_key_path] params[:api_key] ||= Actions.lane_context[SharedValues::APP_STORE_CONNECT_API_KEY] end Match::Runner.new.run(params) define_profile_type(params) define_provisioning_profile_mapping(params) end