diff --git a/Gemfile b/Gemfile index 9fabd103045..a7205e83942 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,7 @@ gem "rspec", "~> 3.10" # Formatter for RSpec to generate JUnit compatible reports. gem "rspec_junit_formatter", "~> 0.4.1" # A Ruby static code analyzer and formatter. -gem "rubocop", Fastlane::RUBOCOP_REQUIREMENT +gem "rubocop", ">= 1.66.0", Fastlane::RUBOCOP_REQUIREMENT # A collection of RuboCop cops for performance optimizations. gem "rubocop-performance" # A RuboCop extension focused on enforcing tools. diff --git a/match/lib/match/nuke.rb b/match/lib/match/nuke.rb index 2825a63013e..158d2a9576c 100644 --- a/match/lib/match/nuke.rb +++ b/match/lib/match/nuke.rb @@ -105,7 +105,7 @@ def spaceship_login Spaceship::ConnectAPI.login(params[:username], use_portal: true, use_tunes: false, portal_team_id: params[:team_id], team_name: params[:team_name]) end - if Spaceship::ConnectAPI.client.in_house? && (type == "distribution" || type == "enterprise") + if Spaceship::ConnectAPI.client.in_house? && (type == "distribution" || type == "enterprise") && !params[:force_nuke_dist_certs] UI.error("---") UI.error("⚠️ Warning: This seems to be an Enterprise account!") unless self.safe_remove_certs diff --git a/match/lib/match/options.rb b/match/lib/match/options.rb index 4ffd1c161de..eec98a036a7 100644 --- a/match/lib/match/options.rb +++ b/match/lib/match/options.rb @@ -297,6 +297,11 @@ def self.available_options description: "Disables confirmation prompts during nuke, answering them with yes", type: Boolean, default_value: false), + FastlaneCore::ConfigItem.new(key: :force_nuke_dist_certs, + env_name: "MATCH_FORCE_NUKE_DIST_CERTS", + description: "Force nuke distribution and enterprise in-house certs. This will cause apps built with these certs to stop working", + type: Boolean, + default_value: false), FastlaneCore::ConfigItem.new(key: :safe_remove_certs, env_name: "MATCH_SAFE_REMOVE_CERTS", description: "Remove certs from repository during nuke without revoking them on the developer portal", diff --git a/match/lib/match/runner.rb b/match/lib/match/runner.rb index 905ef8dd4c7..1222eef89e1 100644 --- a/match/lib/match/runner.rb +++ b/match/lib/match/runner.rb @@ -56,9 +56,9 @@ def run(params) unless params[:readonly] self.spaceship = SpaceshipEnsure.new(params[:username], params[:team_id], params[:team_name], api_token(params)) - if params[:type] == "enterprise" && !Spaceship.client.in_house? - UI.user_error!("You defined the profile type 'enterprise', but your Apple account doesn't support In-House profiles") - end + # if params[:type] == "enterprise" && !Spaceship.client.in_house? + # UI.user_error!("You defined the profile type 'enterprise', but your Apple account doesn't support In-House profiles") + # end end if params[:app_identifier].kind_of?(Array)