match/lib/match/options.rb in fastlane-2.147.0 vs match/lib/match/options.rb in fastlane-2.148.0

- old
+ new

@@ -1,6 +1,7 @@ require 'fastlane_core/configuration/config_item' +require 'fastlane/helper/lane_helper' require 'credentials_manager/appfile_config' require_relative 'module' module Match class Options @@ -8,10 +9,19 @@ def self.append_option(option) self.available_options # to ensure we created the initial `@available_options` array @available_options << option end + def self.default_platform + case Fastlane::Helper::LaneHelper.current_platform.to_s + when "mac" + "macos" + else + "ios" + end + end + def self.available_options user = CredentialsManager::AppfileConfig.try_fetch_value(:apple_dev_portal_id) user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id) [ @@ -213,11 +223,12 @@ default_value: false), FastlaneCore::ConfigItem.new(key: :platform, short_option: '-o', env_name: "MATCH_PLATFORM", description: "Set the provisioning profile's platform to work with (i.e. ios, tvos, macos)", - default_value: "ios", + default_value: default_platform, + default_value_dynamic: true, verify_block: proc do |value| value = value.to_s pt = %w(tvos ios macos) UI.user_error!("Unsupported platform, must be: #{pt}") unless pt.include?(value) end), @@ -229,9 +240,15 @@ FastlaneCore::ConfigItem.new(key: :profile_name, env_name: "MATCH_PROVISIONING_PROFILE_NAME", description: "A custom name for the provisioning profile. This will replace the default provisioning profile name if specified", optional: true, default_value: nil), + FastlaneCore::ConfigItem.new(key: :fail_on_name_taken, + env_name: "MATCH_FAIL_ON_NAME_TAKEN", + description: "Should the command fail if it was about to create a duplicate of an existing provisioning profile. It can happen due to issues on Apple Developer Portal, when profile to be recreated was not properly deleted first", + optional: true, + type: Boolean, + default_value: false), FastlaneCore::ConfigItem.new(key: :output_path, env_name: "MATCH_OUTPUT_PATH", description: "Path in which to export certificates, key and profile", optional: true),