match/lib/match/nuke.rb in fastlane-2.132.0.beta.20190929200020 vs match/lib/match/nuke.rb in fastlane-2.132.0.beta.20190930200026
- old
+ new
@@ -98,11 +98,11 @@
prov_types = [:development] if cert_type == :development
prov_types = [:appstore, :adhoc] if cert_type == :distribution
prov_types = [:enterprise] if cert_type == :enterprise
Spaceship.login(params[:username])
- Spaceship.select_team
+ Spaceship.select_team(team_id: params[:team_id], team_name: params[:team_name])
if Spaceship.client.in_house? && (type == "distribution" || type == "enterprise")
UI.error("---")
UI.error("⚠️ Warning: This seems to be an Enterprise account!")
UI.error("By nuking your account's distribution, all your apps deployed via ad-hoc will stop working!") if type == "distribution"
@@ -110,11 +110,11 @@
UI.error("---")
UI.user_error!("Enterprise account nuke cancelled") unless UI.confirm("Do you really want to nuke your Enterprise account?")
end
- self.certs = certificate_type(cert_type).all
+ self.certs = certificate_type(cert_type).flat_map(&:all)
self.profiles = []
prov_types.each do |prov_type|
self.profiles += profile_type(prov_type).all
end
@@ -239,12 +239,12 @@
end
# The kind of certificate we're interested in
def certificate_type(type)
{
- distribution: Spaceship.certificate.production,
- development: Spaceship.certificate.development,
- enterprise: Spaceship.certificate.in_house
+ distribution: [Spaceship.certificate.production, Spaceship.certificate.apple_distribution],
+ development: [Spaceship.certificate.development, Spaceship.certificate.apple_development],
+ enterprise: [Spaceship.certificate.in_house]
}[type] ||= raise "Unknown type '#{type}'"
end
# The kind of provisioning profile we're interested in
def profile_type(prov_type)