Richard Topchii
Richard Topchii

Reputation: 8185

Fastlane Match - get all provisioning profiles with a single run

When I run fastlane match inside the app's project directory it gets executed with development: true parameter by default, thus fetching only a development certificate and provisioning profile.

I have to run the command multiple times to refresh all the certificates and profiles, for example:

fastlane match adhoc
fastlane match development
fastlane match appstore

Is there any way to run command only once to fetch all of the mentioned above?

Upvotes: 1

Views: 2189

Answers (1)

CodeBender
CodeBender

Reputation: 36640

Looking at the source code for the match command here: https://github.com/fastlane/fastlane/blob/master/match/lib/match/commands_generator.rb

You can see the acceptable arguments:

  command :run do |c|
    c.syntax = 'fastlane match'
    c.description = Match::DESCRIPTION

    FastlaneCore::CommanderGenerator.new.generate(Match::Options.available_options, command: c)

    c.action do |args, options|
      if args.count > 0
        FastlaneCore::UI.user_error!("Please run `fastlane match [type]`, 
        allowed values: development, adhoc, enterprise  or appstore")
      end

      params = FastlaneCore::Configuration.create(Match::Options.available_options, options.__hash__)
      params.load_configuration_file("Matchfile")
      Match::Runner.new.run(params)
    end
  end

For readability:

development, adhoc, enterprise or appstore

As you mentioned, the default value will be development.

With all of that out of the way, it is not possible to provide a single argument to fetch all of them. However, you can try the following as a single command:

fastlane match "adhoc" | fastlane match "development" | fastlane match "appstore"

enter image description here

Upvotes: 1

Related Questions