Module: Match

Defined in:
match/lib/match/nuke.rb,
match/lib/match/setup.rb,
match/lib/match/utils.rb,
match/lib/match/module.rb,
match/lib/match/runner.rb,
match/lib/match/migrate.rb,
match/lib/match/options.rb,
match/lib/match/storage.rb,
match/lib/match/importer.rb,
match/lib/match/generator.rb,
match/lib/match/encryption.rb,
match/lib/match/table_printer.rb,
match/lib/match/change_password.rb,
match/lib/match/spaceship_ensure.rb,
match/lib/match/storage/interface.rb,
match/lib/match/commands_generator.rb,
match/lib/match/encryption/openssl.rb,
match/lib/match/storage/s3_storage.rb,
match/lib/match/storage/git_storage.rb,
match/lib/match/encryption/interface.rb,
match/lib/match/storage/gitlab/client.rb,
match/lib/match/storage/gitlab/secure_file.rb,
match/lib/match/storage/gitlab_secure_files.rb,
match/lib/match/storage/google_cloud_storage.rb

Defined Under Namespace

Modules: Encryption, Storage Classes: ChangePassword, CommandsGenerator, Generator, Importer, Migrate, Nuke, Options, Runner, Setup, SpaceshipEnsure, TablePrinter, Utils

Constant Summary collapse

Helper =

you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore

FastlaneCore::Helper
UI =
FastlaneCore::UI
Boolean =
Fastlane::Boolean
ROOT =
Pathname.new(File.expand_path('../../..', __FILE__))
DESCRIPTION =
"Easily sync your certificates and profiles across your team"

Class Method Summary collapse

Class Method Details

.cert_type_sym(type) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'match/lib/match/module.rb', line 25

def self.cert_type_sym(type)
  type = type.to_s
  return :mac_installer_distribution if type == "mac_installer_distribution"
  return :developer_id_installer if type == "developer_id_installer"
  return :developer_id_application if type == "developer_id"
  return :enterprise if type == "enterprise"
  return :development if type == "development"
  return :distribution if ["adhoc", "appstore", "distribution"].include?(type)
  raise "Unknown cert type: '#{type}'"
end

.environmentsObject



13
14
15
# File 'match/lib/match/module.rb', line 13

def self.environments
  return %w(appstore adhoc development enterprise developer_id mac_installer_distribution developer_id_installer)
end

.profile_type_sym(type) ⇒ Object



21
22
23
# File 'match/lib/match/module.rb', line 21

def self.profile_type_sym(type)
  return type.to_sym
end

.profile_types(prov_type) ⇒ Object

Converts provisioning profile type (i.e. development, enterprise) to an array of profile types That can be used for filtering when using Spaceship::ConnectAPI::Profile API



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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'match/lib/match/module.rb', line 38

def self.profile_types(prov_type)
  case prov_type.to_sym
  when :appstore
    return [
      Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_STORE,
      Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE,
      Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_STORE,
      Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE
    ]
  when :development
    return [
      Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_DEVELOPMENT,
      Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT,
      Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT,
      Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT
    ]
  when :enterprise
    profiles = [
      Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE,
      Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE
    ]

    # As of 2022-06-25, only available with Apple ID auth
    if Spaceship::ConnectAPI.token
      UI.important("Skipping #{Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE} and #{Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE}... only available with Apple ID auth")
    else
      profiles += [
        Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_INHOUSE,
        Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_INHOUSE
      ]
    end

    return profiles
  when :adhoc
    return [
      Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_ADHOC,
      Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC
    ]
  when :developer_id
    return [
      Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT,
      Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT
    ]
  else
    raise "Unknown provisioning type '#{prov_type}'"
  end
end

.storage_modesObject



17
18
19
# File 'match/lib/match/module.rb', line 17

def self.storage_modes
  return %w(git google_cloud s3 gitlab_secure_files)
end