Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spaceship] add a check in app_version.setup_screenshots to also check if there is an app_preview already uploaded #14738

Merged
merged 2 commits into from Mar 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion spaceship/lib/spaceship/tunes/app_version.rb
Expand Up @@ -708,14 +708,19 @@ def container_data_for_language_and_device(data_field, language, device)
end

def setup_screenshots
# Enable Scaling for all screen sizes that don't have at least one screenshot
# Enable Scaling for all screen sizes that don't have at least one screenshot or at least one trailer (app_preview)
# We automatically disable scaling once we upload at least one screenshot
language_details = raw_data_details.each do |current_language|
language_details = (current_language["displayFamilies"] || {})["value"]
(language_details || []).each do |device_language_details|
# Do not enable scaling if a screenshot already exists
next if device_language_details["screenshots"].nil?
next if device_language_details["screenshots"]["value"].count > 0

# Do not enable scaling if a trailer already exists
next if device_language_details["trailers"].nil?
next if device_language_details["trailers"]["value"].count > 0

# The current row includes screenshots for all device types
# so we need to enable scaling for both iOS and watchOS apps
device_language_details["scaled"]["value"] = true if device_language_details["scaled"]
Expand Down