Skip to content

Commit

Permalink
add force_nuke_dist_certs param to allow nuking of distribution and i…
Browse files Browse the repository at this point in the history
…n-house enterprise certs in non-interactive mode
  • Loading branch information
m-wayne committed Oct 9, 2024
1 parent bc36cac commit ca8a4a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion match/lib/match/nuke.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions match/lib/match/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ca8a4a0

Please sign in to comment.