match/lib/match/nuke.rb in fastlane-2.206.2 vs match/lib/match/nuke.rb in fastlane-2.207.0

- old
+ new

@@ -52,10 +52,12 @@ google_cloud_project_id: params[:google_cloud_project_id].to_s, s3_region: params[:s3_region].to_s, s3_access_key: params[:s3_access_key].to_s, s3_secret_access_key: params[:s3_secret_access_key].to_s, s3_bucket: params[:s3_bucket].to_s, + s3_object_prefix: params[:s3_object_prefix].to_s, + gitlab_project: params[:gitlab_project], team_id: params[:team_id] || Spaceship::ConnectAPI.client.portal_team_id }) self.storage.download # After the download was complete @@ -146,13 +148,11 @@ prov_types = [:enterprise] if cert_type == :enterprise # Get all iOS and macOS profile self.profiles = [] prov_types.each do |prov_type| - types = profile_types(prov_type) - # Filtering on 'profileType' seems to be undocumented as of 2020-07-30 - # but works on both web session and official API + types = Match.profile_types(prov_type) self.profiles += Spaceship::ConnectAPI::Profile.all(filter: { profileType: types.join(",") }, includes: "certificates") end # Gets the main and additional cert types cert_types += (params[:additional_cert_types] || []).map do |ct| @@ -399,46 +399,9 @@ return [ Spaceship::ConnectAPI::Certificate::CertificateType::IOS_DISTRIBUTION ] else raise "Unknown type '#{type}'" - end - end - - # The kind of provisioning profile we're interested in - def profile_types(prov_type) - case prov_type.to_sym - when :appstore - return [ - Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_STORE, - Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_STORE, - Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_STORE, - Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_STORE - ] - when :development - return [ - Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_DEVELOPMENT, - Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DEVELOPMENT, - Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_DEVELOPMENT, - Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DEVELOPMENT - ] - when :enterprise - return [ - Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_INHOUSE, - Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_INHOUSE - ] - when :adhoc - return [ - Spaceship::ConnectAPI::Profile::ProfileType::IOS_APP_ADHOC, - Spaceship::ConnectAPI::Profile::ProfileType::TVOS_APP_ADHOC - ] - when :developer_id - return [ - Spaceship::ConnectAPI::Profile::ProfileType::MAC_APP_DIRECT, - Spaceship::ConnectAPI::Profile::ProfileType::MAC_CATALYST_APP_DIRECT - ] - else - raise "Unknown provisioning type '#{prov_type}'" end end # Helpers for `safe_remove_certs` def print_safe_remove_certs_hint