fastlane 2.64.0 → 2.64.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/credentials_manager/lib/credentials_manager/appfile_config.rb +1 -1
  3. data/deliver/lib/deliver/upload_screenshots.rb +2 -0
  4. data/fastlane/lib/assets/DefaultFastfileTemplate +1 -1
  5. data/fastlane/lib/assets/FastfileTemplateAndroid +1 -1
  6. data/fastlane/lib/fastlane/.DS_Store +0 -0
  7. data/fastlane/lib/fastlane/actions/docs/deliver.md +2 -2
  8. data/fastlane/lib/fastlane/actions/docs/frameit.md +2 -2
  9. data/fastlane/lib/fastlane/actions/gradle.rb +6 -0
  10. data/fastlane/lib/fastlane/plugins/template/lib/fastlane/plugin/%plugin_name%/actions/%plugin_name%_action.rb.erb +1 -1
  11. data/fastlane/lib/fastlane/version.rb +1 -1
  12. data/fastlane_core/README.md +1 -1
  13. data/fastlane_core/lib/fastlane_core/build_watcher.rb +17 -9
  14. data/fastlane_core/lib/fastlane_core/ipa_file_analyser.rb +7 -0
  15. data/frameit/lib/frameit/editor.rb +2 -1
  16. data/pilot/lib/pilot/build_manager.rb +7 -1
  17. data/pilot/lib/pilot/options.rb +6 -1
  18. data/{fastlane/lib/fastlane/actions/docs/assets → precheck/lib}/.DS_Store +0 -0
  19. data/snapshot/lib/snapshot/test_command_generator.rb +2 -2
  20. data/spaceship/README.md +1 -1
  21. data/spaceship/lib/spaceship/du/du_client.rb +26 -1
  22. data/spaceship/lib/spaceship/portal/app.rb +1 -1
  23. data/spaceship/lib/spaceship/test_flight/build.rb +7 -2
  24. data/spaceship/lib/spaceship/tunes/iap_detail.rb +1 -14
  25. data/spaceship/lib/spaceship/tunes/tunes_client.rb +15 -16
  26. metadata +6 -9
  27. data/fastlane/lib/.DS_Store +0 -0
  28. data/fastlane/lib/fastlane/actions/.DS_Store +0 -0
  29. data/fastlane/lib/fastlane/actions/docs/.DS_Store +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58cf45448852ff0afa3d02f4689e1426124cd61a
4
- data.tar.gz: 51ef302587ecf9924aa79499d967cdd735dcf7c7
3
+ metadata.gz: 88e89c4afc0dec58479bded448ece9ffe0e73e45
4
+ data.tar.gz: 2e446109c43c5fa44417b6773ff707001975300a
5
5
  SHA512:
6
- metadata.gz: e9036b8ae59ff26e829479d113c4a61682aecb98b717411ad0b2d5799fd100d64c804db7d162743c9ddd264418f59c05b6eb6716f04c26df1738f60369250b66
7
- data.tar.gz: d9600eaa5bae70d2879add3f35438e30d3e169c2f469934cc09dd0004e2b1cbaf3e6d910386e67eccdea931005b67e5b595b488def8144b0f7a96afe65163e02
6
+ metadata.gz: d068e5499c2ed3f4b828fdaf405471244174f8b435e7626ba9e27620d30e71df607caf5ba55a015818fd7c9fa475e76376646b2ded76b739b6962826ed98388a
7
+ data.tar.gz: e826d17ad6decfeec18527f25a23b9bee6c9f496c5c1e646d89d13db302be8ed95c15c26fbb61c038c6cd37da3716293944ddde8e59c27571b9c8786486f2e9f
@@ -151,7 +151,7 @@ module CredentialsManager
151
151
  if lane_name.to_s.split(" ").count > 1
152
152
  # That's the legacy syntax 'platform name'
153
153
  puts "You use deprecated syntax '#{lane_name}' in your Appfile.".yellow
154
- puts "Please follow the Appfile guide: https://github.com/fastlane/fastlane/blob/master/docs/Appfile.md".yellow
154
+ puts "Please follow the Appfile guide: https://docs.fastlane.tools/advanced/#appfile".yellow
155
155
  platform, lane_name = lane_name.split(" ")
156
156
 
157
157
  return unless platform == ENV["FASTLANE_PLATFORM_NAME"]
@@ -17,6 +17,8 @@ module Deliver
17
17
  UI.message("Removing all previously uploaded screenshots...")
18
18
  # First, clear all previously uploaded screenshots
19
19
  screenshots_per_language.keys.each do |language|
20
+ # We have to nil check for languages not activated
21
+ next if v.screenshots[language].nil?
20
22
  v.screenshots[language].each_with_index do |t, index|
21
23
  v.upload_screenshot!(nil, t.sort_order, t.language, t.device_type, false)
22
24
  end
@@ -66,7 +66,7 @@ platform :ios do
66
66
  end
67
67
 
68
68
 
69
- # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
69
+ # More information about multiple platforms in fastlane: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
70
70
  # All available actions: https://docs.fastlane.tools/actions
71
71
 
72
72
  # fastlane reports which actions are used. No personal data is recorded.
@@ -58,7 +58,7 @@ platform :android do
58
58
  end
59
59
  end
60
60
 
61
- # More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
61
+ # More information about multiple platforms in fastlane: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
62
62
  # All available actions: https://docs.fastlane.tools/actions
63
63
 
64
64
  # fastlane reports which actions are used. No personal data is recorded.
Binary file
@@ -243,7 +243,7 @@ app_review_information(
243
243
  You can also provide these values by creating files in a `metadata/review_information/` directory. The file names must match the pattern `<key>.txt` (e.g. `first_name.txt`, `notes.txt` etc.). The contents of each file will be used as the value for the matching key. Values provided in the `Deliverfile` or `Fastfile` will be take priority over values from these files.
244
244
 
245
245
  ##### submission_information
246
- Must be a hash. This is used as the last step for the deployment process, where you define if you use third party content or use encryption. [A list of available options](https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/tunes/app_submission.rb#L18-L69).
246
+ Must be a hash. This is used as the last step for the deployment process, where you define if you use third party content or use encryption. [A list of available options](https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/tunes/app_submission.rb).
247
247
 
248
248
  ```ruby-skip-tests
249
249
  submission_information({
@@ -638,7 +638,7 @@ In this case, default values for keywords, urls, name and release notes are used
638
638
  If you want to integrate _deliver_ with [snapshot](https://github.com/fastlane/fastlane/tree/master/snapshot), check out [fastlane](https://fastlane.tools)!
639
639
 
640
640
  ## Jenkins integration
641
- Detailed instructions about how to set up _deliver_ and _fastlane_ in `Jenkins` can be found in the [fastlane README](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Jenkins.md).
641
+ Detailed instructions about how to set up _deliver_ and _fastlane_ in `Jenkins` can be found in the [fastlane README](https://docs.fastlane.tools/best-practices/continuous-integration/#jenkins-integration).
642
642
 
643
643
  ## Firewall Issues
644
644
 
@@ -28,7 +28,7 @@ Put a gorgeous device frame around your iOS and macOS screenshots just by runnin
28
28
 
29
29
  The complete and updated list of supported devices and colors can be found [here](https://github.com/fastlane/frameit-frames/tree/gh-pages/latest)
30
30
 
31
- Here is a nice gif, that shows ```frameit``` in action:
31
+ Here is a nice gif, that shows _frameit_ in action:
32
32
 
33
33
  ![img/actions/FrameitGit.gif](/img/actions/FrameitGit.gif?raw=1)
34
34
 
@@ -47,7 +47,7 @@ Here is a nice gif, that shows ```frameit``` in action:
47
47
  <h5 align="center">The <code>frameit</code> 2.0 update was kindly sponsored by <a href="https://mindnode.com/">MindNode</a>, seen in the screenshots above.</h5>
48
48
 
49
49
 
50
- The first time that ```frameit``` is executed the frames will be downloaded automatically. Originally the frames are coming from [Facebook frameset](http://facebook.design/devices) and they are kept on this repo: https://github.com/fastlane/frameit-frames
50
+ The first time that _frameit_ is executed the frames will be downloaded automatically. Originally the frames are coming from [Facebook frameset](http://facebook.design/devices) and they are kept on this repo: https://github.com/fastlane/frameit-frames
51
51
 
52
52
  More information about this process and how to update the frames can be found [here](https://github.com/fastlane/fastlane/tree/master/frameit/frames_generator)
53
53
 
@@ -36,6 +36,7 @@ module Fastlane
36
36
  flags = []
37
37
  flags << "-p #{project_dir.shellescape}"
38
38
  flags << params[:properties].map { |k, v| "-P#{k.to_s.shellescape}=#{v.to_s.shellescape}" }.join(' ') unless params[:properties].nil?
39
+ flags << params[:system_properties].map { |k, v| "-D#{k.to_s.shellescape}=#{v.to_s.shellescape}" }.join(' ') unless params[:system_properties].nil?
39
40
  flags << params[:flags] unless params[:flags].nil?
40
41
 
41
42
  # Run the actual gradle task
@@ -125,6 +126,11 @@ module Fastlane
125
126
  description: 'Gradle properties to be exposed to the gradle script',
126
127
  optional: true,
127
128
  is_string: false),
129
+ FastlaneCore::ConfigItem.new(key: :system_properties,
130
+ env_name: 'FL_GRADLE_SYSTEM_PROPERTIES',
131
+ description: 'Gradle system properties to be exposed to the gradle script',
132
+ optional: true,
133
+ is_string: false),
128
134
  FastlaneCore::ConfigItem.new(key: :serial,
129
135
  env_name: 'FL_ANDROID_SERIAL',
130
136
  description: 'Android serial, which device should be used for this command',
@@ -34,7 +34,7 @@ module Fastlane
34
34
 
35
35
  def self.is_supported?(platform)
36
36
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
37
- # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
37
+ # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
38
38
  #
39
39
  # [:ios, :mac, :android].include?(platform)
40
40
  true
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.64.0'.freeze
2
+ VERSION = '2.64.1'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -28,7 +28,7 @@ FastlaneCore
28
28
  ============
29
29
 
30
30
  [![Twitter: @FastlaneTools](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
31
- [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/fastlane_core/LICENSE)
31
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/LICENSE)
32
32
 
33
33
  All shared code of the fastlane tools is stored in this repository.
34
34
 
@@ -2,13 +2,21 @@ module FastlaneCore
2
2
  class BuildWatcher
3
3
  class << self
4
4
  # @return The build we waited for. This method will always return a build
5
- def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, poll_interval: 10)
6
- # First, find the train and build version we want to watch for
7
- watched_build = watching_build(app_id: app_id, platform: platform)
8
- UI.crash!("Could not find a build for app: #{app_id} on platform: #{platform}") if watched_build.nil?
5
+ def wait_for_build_processing_to_be_complete(app_id: nil, platform: nil, train_version: nil, build_version: nil, poll_interval: 10, strict_build_watch: false)
6
+ unless strict_build_watch
7
+ # First, find the train and build version we want to watch for
8
+ watched_build = watching_build(app_id: app_id, platform: platform)
9
+ UI.crash!("Could not find a build for app: #{app_id} on platform: #{platform}") if watched_build.nil?
10
+
11
+ unless watched_build.train_version == train_version && watched_build.build_version == build_version
12
+ UI.important("Started watching build #{watched_build.train_version} - #{watched_build.build_version} but expected #{train_version} - #{build_version}")
13
+ end
14
+ train_version = watched_build.train_version
15
+ build_version = watched_build.build_version
16
+ end
9
17
 
10
18
  loop do
11
- matched_build = matching_build(watched_build: watched_build, app_id: app_id, platform: platform)
19
+ matched_build = matching_build(watched_train_version: train_version, watched_build_version: build_version, app_id: app_id, platform: platform)
12
20
 
13
21
  report_status(build: matched_build)
14
22
 
@@ -29,9 +37,9 @@ module FastlaneCore
29
37
  watched_build || Spaceship::TestFlight::Build.latest(app_id: app_id, platform: platform)
30
38
  end
31
39
 
32
- def matching_build(watched_build: nil, app_id: nil, platform: nil)
33
- matched_builds = Spaceship::TestFlight::Build.builds_for_train(app_id: app_id, platform: platform, train_version: watched_build.train_version, retry_count: 2)
34
- matched_builds.find { |build| build.build_version == watched_build.build_version }
40
+ def matching_build(watched_train_version: nil, watched_build_version: nil, app_id: nil, platform: nil)
41
+ matched_builds = Spaceship::TestFlight::Build.builds_for_train(app_id: app_id, platform: platform, train_version: watched_train_version, retry_count: 2)
42
+ matched_builds.find { |build| build.build_version == watched_build_version }
35
43
  end
36
44
 
37
45
  def report_status(build: nil)
@@ -44,7 +52,7 @@ module FastlaneCore
44
52
  UI.message("Build doesn't show up in the build list anymore, waiting for it to appear again")
45
53
  elsif build.active?
46
54
  UI.success("Build #{build.train_version} - #{build.build_version} is already being tested")
47
- elsif build.ready_to_submit? || build.export_compliance_missing?
55
+ elsif build.ready_to_submit? || build.export_compliance_missing? || build.review_rejected?
48
56
  UI.success("Successfully finished processing the build #{build.train_version} - #{build.build_version}")
49
57
  else
50
58
  UI.message("Waiting for iTunes Connect to finish processing the new build (#{build.train_version} - #{build.build_version})")
@@ -17,6 +17,13 @@ module FastlaneCore
17
17
  return nil
18
18
  end
19
19
 
20
+ # Fetches the app build number from the given ipa file.
21
+ def self.fetch_app_build(path)
22
+ plist = self.fetch_info_plist_file(path)
23
+ return plist['CFBundleVersion'] if plist
24
+ return nil
25
+ end
26
+
20
27
  # Fetches the app platform from the given ipa file.
21
28
  def self.fetch_app_platform(path)
22
29
  plist = self.fetch_info_plist_file(path)
@@ -170,7 +170,8 @@ module Frameit
170
170
  background = MiniMagick::Image.open(fetch_config['background'])
171
171
 
172
172
  if background.height != screenshot.size[1]
173
- background.resize "#{screenshot.size[0]}x#{screenshot.size[1]}!" # `!` says it should ignore the ratio
173
+ background.resize "#{screenshot.size[0]}x#{screenshot.size[1]}^" # `^` says it should fill area
174
+ background.merge! ["-gravity", "center", "-crop", "#{screenshot.size[0]}x#{screenshot.size[1]}+0+0"] # crop from center
174
175
  end
175
176
  background
176
177
  end
@@ -35,7 +35,13 @@ module Pilot
35
35
  end
36
36
 
37
37
  UI.message("If you want to skip waiting for the processing to be finished, use the `skip_waiting_for_build_processing` option")
38
- latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform, poll_interval: config[:wait_processing_interval])
38
+ app_version = FastlaneCore::IpaFileAnalyser.fetch_app_version(config[:ipa])
39
+ app_build = FastlaneCore::IpaFileAnalyser.fetch_app_build(config[:ipa])
40
+ latest_build = FastlaneCore::BuildWatcher.wait_for_build_processing_to_be_complete(app_id: app.apple_id, platform: platform, train_version: app_version, build_version: app_build, poll_interval: config[:wait_processing_interval], strict_build_watch: config[:wait_for_uploaded_build])
41
+
42
+ unless latest_build.train_version == app_version && latest_build.build_version == app_build
43
+ UI.important("Uploaded app #{app_version} - #{app_build}, but received build #{latest_build.train_version} - #{latest_build.build_version}. If you want to wait for uploaded build to be finished processing, use the `wait_for_uploaded_build` option")
44
+ end
39
45
 
40
46
  distribute(options, build: latest_build)
41
47
  end
@@ -158,7 +158,12 @@ module Pilot
158
158
  type: Array,
159
159
  verify_block: proc do |value|
160
160
  UI.user_error!("Could not evaluate array from '#{value}'") unless value.kind_of?(Array)
161
- end)
161
+ end),
162
+ FastlaneCore::ConfigItem.new(key: :wait_for_uploaded_build,
163
+ env_name: "PILOT_WAIT_FOR_UPLOADED_BUILD",
164
+ description: "Use version info from uploaded ipa file to determine what build to use for distribution. If set to false, latest processing or any latest build will be used",
165
+ is_string: false,
166
+ default_value: false)
162
167
  ]
163
168
  end
164
169
  end
@@ -55,14 +55,14 @@ module Snapshot
55
55
  # Check each device to see if it is an iOS device
56
56
  all_ios = devices.map do |device|
57
57
  device = device.downcase
58
- device.start_with?('iphone', 'ipad')
58
+ device.include?('iphone') || device.include?('ipad')
59
59
  end
60
60
  # Return true if all devices are iOS devices
61
61
  return true unless all_ios.include?(false)
62
62
 
63
63
  all_tvos = devices.map do |device|
64
64
  device = device.downcase
65
- device.start_with?('apple tv')
65
+ device.include?('apple tv')
66
66
  end
67
67
  # Return true if all devices are iOS devices
68
68
  return true unless all_tvos.include?(false)
data/spaceship/README.md CHANGED
@@ -31,7 +31,7 @@
31
31
  -------
32
32
 
33
33
  [![Twitter: @FastlaneTools](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
34
- [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/spaceship/LICENSE)
34
+ [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/LICENSE)
35
35
 
36
36
  `spaceship` exposes both the Apple Developer Center and the iTunes Connect API. This fast and powerful API powers parts of fastlane, and can be leveraged for more advanced fastlane features. Scripting your Developer Center workflow has never been easier!
37
37
 
@@ -19,7 +19,7 @@ module Spaceship
19
19
  end
20
20
 
21
21
  def upload_purchase_review_screenshot(app_id, upload_file, content_provider_id, sso_token_for_image)
22
- upload_file(app_id: app_id, upload_file: upload_file, path: '/upload/image', content_provider_id: content_provider_id, sso_token: sso_token_for_image, du_validation_rule_set: 'MZPFT.SortedScreenShot')
22
+ upload_file(app_id: app_id, upload_file: upload_file, path: '/upload/image', content_provider_id: content_provider_id, sso_token: sso_token_for_image, du_validation_rule_set: get_picture_type(upload_file))
23
23
  end
24
24
 
25
25
  def upload_large_icon(app_version, upload_file, content_provider_id, sso_token_for_image)
@@ -42,6 +42,16 @@ module Spaceship
42
42
  upload_file(app_version: app_version, upload_file: upload_file, path: '/upload/image', content_provider_id: content_provider_id, sso_token: sso_token_for_image, du_validation_rule_set: screenshot_picture_type(device, nil))
43
43
  end
44
44
 
45
+ def get_picture_type(upload_file)
46
+ resolution = Utilities.resolution(upload_file.file_path)
47
+ result = device_resolution_map.find do |key, resolutions|
48
+ resolutions.include? resolution
49
+ end
50
+ raise "Unknown device for screen resolution #{resolution}" if result.nil?
51
+
52
+ picture_type_map[result[0]]
53
+ end
54
+
45
55
  private
46
56
 
47
57
  def upload_file(app_version: nil, upload_file: nil, path: nil, content_provider_id: nil, sso_token: nil, du_validation_rule_set: nil, app_id: nil)
@@ -113,6 +123,21 @@ module Spaceship
113
123
  }
114
124
  end
115
125
 
126
+ def device_resolution_map
127
+ # rubocop:enable Layout/ExtraSpacing
128
+ {
129
+ watch: [[312, 390]],
130
+ ipad: [[1024, 748], [1024, 768], [2048, 1496], [2048, 1536], [768, 1004], [768, 1024], [1536, 2008], [1536, 2048]],
131
+ ipadPro: [[2048, 2732], [2732, 2048]],
132
+ iphone6: [[750, 1334], [1334, 750]],
133
+ iphone6Plus: [[1242, 2208], [2208, 1242]],
134
+ iphone4: [[640, 1096], [640, 1136], [1136, 600], [1136, 640]],
135
+ iphone35: [[640, 960], [640, 920], [960, 600], [960, 640]],
136
+ appleTV: [[1920, 1080]],
137
+ desktop: [[1280, 800], [1440, 900], [2560, 1600], [2880, 1800]]
138
+ }
139
+ end
140
+
116
141
  def screenshot_picture_type(device, is_messages)
117
142
  map = is_messages ? messages_picture_type_map : picture_type_map
118
143
  device = device.to_sym
@@ -107,7 +107,7 @@ module Spaceship
107
107
  end
108
108
 
109
109
  def associated_groups
110
- return unless raw_data.key?('associatedApplicationGroups')
110
+ return unless raw_data['associatedApplicationGroups']
111
111
 
112
112
  @associated_groups ||= raw_data['associatedApplicationGroups'].map do |info|
113
113
  Spaceship::Portal::AppGroup.new(info)
@@ -69,7 +69,8 @@ module Spaceship::TestFlight
69
69
  active: 'testflight.build.state.testing.active',
70
70
  ready_to_submit: 'testflight.build.state.submit.ready',
71
71
  ready_to_test: 'testflight.build.state.testing.ready',
72
- export_compliance_missing: 'testflight.build.state.export.compliance.missing'
72
+ export_compliance_missing: 'testflight.build.state.export.compliance.missing',
73
+ review_rejected: 'testflight.build.state.review.rejected'
73
74
  }
74
75
 
75
76
  # Find a Build by `build_id`.
@@ -130,8 +131,12 @@ module Spaceship::TestFlight
130
131
  external_state == BUILD_STATES[:export_compliance_missing]
131
132
  end
132
133
 
134
+ def review_rejected?
135
+ external_state == BUILD_STATES[:review_rejected]
136
+ end
137
+
133
138
  def processed?
134
- active? || ready_to_submit? || export_compliance_missing?
139
+ active? || ready_to_submit? || export_compliance_missing? || review_rejected?
135
140
  end
136
141
 
137
142
  # Getting builds from BuildTrains only gets a partial Build object
@@ -186,20 +186,7 @@ module Spaceship
186
186
  # Upload Screenshot
187
187
  upload_file = UploadFile.from_path @review_screenshot
188
188
  screenshot_data = client.upload_purchase_review_screenshot(application.apple_id, upload_file)
189
- new_screenshot = {
190
- "value" => {
191
- "assetToken" => screenshot_data["token"],
192
- "sortOrder" => 0,
193
- "type" => "SortedScreenShot",
194
- "originalFileName" => upload_file.file_name,
195
- "size" => screenshot_data["length"],
196
- "height" => screenshot_data["height"],
197
- "width" => screenshot_data["width"],
198
- "checksum" => screenshot_data["md5"]
199
- }
200
- }
201
-
202
- raw_data["versions"][0]["reviewScreenshot"] = new_screenshot
189
+ raw_data["versions"][0]["reviewScreenshot"] = screenshot_data
203
190
  end
204
191
  # Update the Purchase
205
192
  client.update_iap!(app_id: application.apple_id, purchase_id: self.purchase_id, data: raw_data)
@@ -662,9 +662,21 @@ module Spaceship
662
662
  # Uploads an In-App-Purchase Review screenshot
663
663
  # @param app_id (AppId): The id of the app
664
664
  # @param upload_image (UploadFile): The icon to upload
665
- # @return [JSON] the response
665
+ # @return [JSON] the screenshot data, ready to be added to an In-App-Purchase
666
666
  def upload_purchase_review_screenshot(app_id, upload_image)
667
- du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image)
667
+ data = du_client.upload_purchase_review_screenshot(app_id, upload_image, content_provider_id, sso_token_for_image)
668
+ {
669
+ "value" => {
670
+ "assetToken" => data["token"],
671
+ "sortOrder" => 0,
672
+ "type" => du_client.get_picture_type(upload_image),
673
+ "originalFileName" => upload_image.file_name,
674
+ "size" => data["length"],
675
+ "height" => data["height"],
676
+ "width" => data["width"],
677
+ "checksum" => data["md5"]
678
+ }
679
+ }
668
680
  end
669
681
 
670
682
  # Uploads a screenshot
@@ -1148,20 +1160,7 @@ module Spaceship
1148
1160
  # Upload Screenshot:
1149
1161
  upload_file = UploadFile.from_path review_screenshot
1150
1162
  screenshot_data = upload_purchase_review_screenshot(app_id, upload_file)
1151
- new_screenshot = {
1152
- "value" => {
1153
- "assetToken" => screenshot_data["token"],
1154
- "sortOrder" => 0,
1155
- "type" => "SortedScreenShot",
1156
- "originalFileName" => upload_file.file_name,
1157
- "size" => screenshot_data["length"],
1158
- "height" => screenshot_data["height"],
1159
- "width" => screenshot_data["width"],
1160
- "checksum" => screenshot_data["md5"]
1161
- }
1162
- }
1163
-
1164
- data["versions"][0]["reviewScreenshot"] = new_screenshot
1163
+ data["versions"][0]["reviewScreenshot"] = screenshot_data
1165
1164
  end
1166
1165
 
1167
1166
  # Now send back the modified hash
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.64.0
4
+ version: 2.64.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2017-11-06 00:00:00.000000000 Z
18
+ date: 2017-11-13 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: slack-notifier
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 1.5.0
46
+ version: 1.5.2
47
47
  - - "<"
48
48
  - !ruby/object:Gem::Version
49
49
  version: 2.0.0
@@ -53,7 +53,7 @@ dependencies:
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 1.5.0
56
+ version: 1.5.2
57
57
  - - "<"
58
58
  - !ruby/object:Gem::Version
59
59
  version: 2.0.0
@@ -828,7 +828,6 @@ files:
828
828
  - deliver/lib/deliver/upload_price_tier.rb
829
829
  - deliver/lib/deliver/upload_screenshots.rb
830
830
  - fastlane/README.md
831
- - fastlane/lib/.DS_Store
832
831
  - fastlane/lib/assets/ActionDetails.md.erb
833
832
  - fastlane/lib/assets/Actions.md.erb
834
833
  - fastlane/lib/assets/AppfileTemplate
@@ -849,7 +848,6 @@ files:
849
848
  - fastlane/lib/fastlane/.DS_Store
850
849
  - fastlane/lib/fastlane/action.rb
851
850
  - fastlane/lib/fastlane/action_collector.rb
852
- - fastlane/lib/fastlane/actions/.DS_Store
853
851
  - fastlane/lib/fastlane/actions/README.md
854
852
  - fastlane/lib/fastlane/actions/actions_helper.rb
855
853
  - fastlane/lib/fastlane/actions/adb.rb
@@ -894,8 +892,6 @@ files:
894
892
  - fastlane/lib/fastlane/actions/deliver.rb
895
893
  - fastlane/lib/fastlane/actions/deploygate.rb
896
894
  - fastlane/lib/fastlane/actions/device_grid/README.md
897
- - fastlane/lib/fastlane/actions/docs/.DS_Store
898
- - fastlane/lib/fastlane/actions/docs/assets/.DS_Store
899
895
  - fastlane/lib/fastlane/actions/docs/assets/FrameitGit.gif
900
896
  - fastlane/lib/fastlane/actions/docs/assets/MacExample.png
901
897
  - fastlane/lib/fastlane/actions/docs/assets/PEMRecording.gif
@@ -1298,6 +1294,7 @@ files:
1298
1294
  - pilot/lib/pilot/tester_manager.rb
1299
1295
  - pilot/lib/pilot/tester_util.rb
1300
1296
  - precheck/README.md
1297
+ - precheck/lib/.DS_Store
1301
1298
  - precheck/lib/assets/PrecheckfileTemplate
1302
1299
  - precheck/lib/precheck.rb
1303
1300
  - precheck/lib/precheck/commands_generator.rb
@@ -1538,7 +1535,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1538
1535
  version: '0'
1539
1536
  requirements: []
1540
1537
  rubyforge_project:
1541
- rubygems_version: 2.6.8
1538
+ rubygems_version: 2.2.5
1542
1539
  signing_key:
1543
1540
  specification_version: 4
1544
1541
  summary: The easiest way to automate beta deployments and releases for your iOS and
Binary file