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

[deliver] fix regression where changes made to the privacy URL fail to upload #21657

Merged
merged 3 commits into from Nov 22, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions deliver/lib/deliver/upload_metadata.rb
Expand Up @@ -468,7 +468,7 @@ def updating_localized_app_info?(options, app, app_info)
end
localizations = app_info.get_app_info_localizations

LOCALISED_APP_VALUES.keys.each do |key|
LOCALISED_APP_VALUES.each do |key, localized_key|
current = options[key]
next unless current

Expand All @@ -485,7 +485,7 @@ def updating_localized_app_info?(options, app, app_info)
next if app_info_locale.nil?

begin
current_value = app_info_locale.public_send(key.to_sym)
current_value = app_info_locale.public_send(localized_key.to_sym)
rescue NoMethodError
next
end
Expand Down
25 changes: 25 additions & 0 deletions deliver/spec/upload_metadata_spec.rb
Expand Up @@ -289,6 +289,31 @@ def create_metadata(path, text)
end
end

context "with privacy_url" do
it 'saves privacy_url' do
options = {
platform: "ios",
metadata_path: metadata_path,
privacy_url: { "en-US" => "https://fastlane.tools" },
apple_tv_privacy_policy: { "en-US" => "https://fastlane.tools/tv" }
}

# Get number of versions (used for if whats_new should be sent)
expect(Spaceship::ConnectAPI).to receive(:get_app_store_versions).and_return(app_store_versions)

expect(version).to receive(:update).with(attributes: {})

# Validate symbol names used when comparing privacy urls before upload
expect(app_info_localization_en).to receive(:privacy_policy_url).and_return(options[:privacy_url]["en-US"])
expect(app_info_localization_en).to receive(:privacy_policy_text).and_return(options[:apple_tv_privacy_policy]["en-US"])

# Update app info
expect(app_info).to receive(:update_categories).with(category_id_map: {})

uploader.upload(options)
end
end

context "with auto_release_date" do
it 'with date' do
options = {
Expand Down