From 262c28640675db03f93a8df8dc98ead7dff6b5ca Mon Sep 17 00:00:00 2001 From: m-wayne Date: Tue, 15 Nov 2022 12:26:28 -0800 Subject: [PATCH] add force_nuke_dist_certs param to allow nuking of distribution and in-house enterprise certs in non-interactive mode --- match/lib/match/nuke.rb | 2 +- match/lib/match/options.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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",