fastlane/lib/fastlane/actions/xcode_install.rb in fastlane_hotfix-2.165.1 vs fastlane/lib/fastlane/actions/xcode_install.rb in fastlane_hotfix-2.187.0

- old
+ new

@@ -15,11 +15,11 @@ installer = XcodeInstall::Installer.new if installer.installed?(params[:version]) UI.success("Xcode #{params[:version]} is already installed ✨") else - installer.install_version(params[:version], true, true, true, true) + installer.install_version(params[:version], true, true, true, true, nil, true, nil, params[:download_retry_attempts]) end xcode = installer.installed_versions.find { |x| x.version == params[:version] } UI.user_error!("Could not find Xcode with version '#{params[:version]}'") unless xcode UI.message("Using Xcode #{params[:version]} on path '#{xcode.path}'") @@ -47,13 +47,11 @@ user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id) [ FastlaneCore::ConfigItem.new(key: :version, env_name: "FL_XCODE_VERSION", - description: "The version number of the version of Xcode to install", - verify_block: proc do |value| - end), + description: "The version number of the version of Xcode to install"), FastlaneCore::ConfigItem.new(key: :username, short_option: "-u", env_name: "XCODE_INSTALL_USER", description: "Your Apple ID Username", default_value: user, @@ -63,10 +61,15 @@ env_name: "XCODE_INSTALL_TEAM_ID", description: "The ID of your team if you're in multiple teams", optional: true, code_gen_sensitive: true, default_value: CredentialsManager::AppfileConfig.try_fetch_value(:team_id), - default_value_dynamic: true) + default_value_dynamic: true), + FastlaneCore::ConfigItem.new(key: :download_retry_attempts, + env_name: "XCODE_INSTALL_DOWNLOAD_RETRY_ATTEMPTS", + description: "Number of times the download will be retried in case of failure", + type: Integer, + default_value: 3) ] end def self.output [