fastlane 2.151.0 → 2.153.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +78 -78
  3. data/deliver/lib/deliver/.upload_metadata.rb.swp +0 -0
  4. data/deliver/lib/deliver/app_screenshot.rb +1 -1
  5. data/deliver/lib/deliver/commands_generator.rb +7 -4
  6. data/deliver/lib/deliver/detect_values.rb +9 -3
  7. data/deliver/lib/deliver/download_screenshots.rb +36 -31
  8. data/deliver/lib/deliver/options.rb +1 -1
  9. data/deliver/lib/deliver/runner.rb +5 -10
  10. data/deliver/lib/deliver/setup.rb +94 -3
  11. data/deliver/lib/deliver/submit_for_review.rb +4 -6
  12. data/deliver/lib/deliver/upload_metadata.rb +32 -28
  13. data/deliver/lib/deliver/upload_price_tier.rb +1 -3
  14. data/deliver/lib/deliver/upload_screenshots.rb +76 -45
  15. data/{deliver/lib/deliver/.download_screenshots.rb.swp → fastlane/lib/fastlane/.erb_template_helper.rb.swp} +0 -0
  16. data/{spaceship/lib/spaceship/connect_api/models/.app_screenshot.rb.swp → fastlane/lib/fastlane/actions/.git_commit.rb.swp} +0 -0
  17. data/fastlane/lib/fastlane/actions/docs/frame_screenshots.md +3 -1
  18. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +1 -1
  19. data/fastlane/lib/fastlane/actions/download_dsyms.rb +4 -2
  20. data/fastlane/lib/fastlane/actions/erb.rb +10 -2
  21. data/fastlane/lib/fastlane/actions/git_branch.rb +4 -1
  22. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +11 -3
  23. data/fastlane/lib/fastlane/helper/s3_client_helper.rb +1 -1
  24. data/fastlane/lib/fastlane/runner.rb +3 -1
  25. data/fastlane/lib/fastlane/version.rb +1 -1
  26. data/fastlane/swift/Deliverfile.swift +1 -1
  27. data/fastlane/swift/DeliverfileProtocol.swift +3 -3
  28. data/fastlane/swift/Fastlane.swift +19 -7
  29. data/fastlane/swift/Gymfile.swift +1 -1
  30. data/fastlane/swift/GymfileProtocol.swift +1 -1
  31. data/fastlane/swift/Matchfile.swift +1 -1
  32. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  33. data/fastlane/swift/Precheckfile.swift +1 -1
  34. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  35. data/fastlane/swift/Scanfile.swift +1 -1
  36. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  37. data/fastlane/swift/Screengrabfile.swift +1 -1
  38. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  39. data/fastlane/swift/Snapshotfile.swift +1 -1
  40. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  41. data/fastlane_core/lib/fastlane_core/device_manager.rb +20 -6
  42. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +6 -3
  43. data/frameit/lib/frameit/editor.rb +8 -5
  44. data/match/lib/match/runner.rb +4 -4
  45. data/pilot/lib/pilot/options.rb +6 -0
  46. data/scan/lib/scan/runner.rb +19 -6
  47. data/spaceship/lib/spaceship/connect_api.rb +1 -0
  48. data/{deliver/lib/deliver/.commands_generator.rb.swp → spaceship/lib/spaceship/connect_api/.model.rb.swp} +0 -0
  49. data/spaceship/lib/spaceship/connect_api/client.rb +2 -2
  50. data/spaceship/lib/spaceship/connect_api/file_uploader.rb +0 -1
  51. data/spaceship/lib/spaceship/connect_api/model.rb +14 -0
  52. data/spaceship/lib/spaceship/connect_api/{.file_uploader.rb.swp → models/.app_store_review_detail.rb.swp} +0 -0
  53. data/spaceship/lib/spaceship/connect_api/models/.app_store_version.rb.swp +0 -0
  54. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +1 -0
  55. data/spaceship/lib/spaceship/connect_api/models/app.rb +40 -2
  56. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +1 -0
  57. data/spaceship/lib/spaceship/connect_api/models/app_preview.rb +5 -4
  58. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +44 -5
  59. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +1 -0
  60. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +12 -0
  61. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +1 -0
  62. data/spaceship/lib/spaceship/connect_api/models/app_store_version_release_request.rb +12 -0
  63. data/spaceship/lib/spaceship/connect_api/models/build.rb +1 -0
  64. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +1 -0
  65. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +32 -1
  66. metadata +39 -64
  67. data/deliver/lib/deliver/.submit_for_review.rb.swp +0 -0
  68. data/deliver/lib/deliver/.upload_screenshots.rb.swp +0 -0
@@ -7,9 +7,7 @@ require 'fastlane_core/pkg_file_analyser'
7
7
  module Deliver
8
8
  class SubmitForReview
9
9
  def submit!(options)
10
- legacy_app = options[:app]
11
- app_id = legacy_app.apple_id
12
- app = Spaceship::ConnectAPI::App.get(app_id: app_id)
10
+ app = options[:app]
13
11
 
14
12
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
15
13
  version = app.get_edit_app_store_version(platform: platform)
@@ -120,10 +118,10 @@ module Deliver
120
118
  " Example: submission_information: { add_id_info_uses_idfa: false }",
121
119
  " Example: submission_information: {",
122
120
  " add_id_info_uses_idfa: true,",
123
- " add_id_info_limits_tracking: false,",
124
121
  " add_id_info_serves_ads: false,",
125
- " add_id_info_uses_idfa: false,",
126
- " add_id_info_tracks_install: false",
122
+ " add_id_info_tracks_install: true,",
123
+ " add_id_info_tracks_action: true,",
124
+ " add_id_info_limits_tracking: true",
127
125
  " }",
128
126
  " Example CLI:",
129
127
  " --submission_information \"{\\\"add_id_info_uses_idfa\\\": false}\""
@@ -8,10 +8,10 @@ module Deliver
8
8
  LOCALISED_VERSION_VALUES = {
9
9
  description: "description",
10
10
  keywords: "keywords",
11
- release_notes: "whatsNew",
12
- support_url: "supportUrl",
13
- marketing_url: "marketingUrl",
14
- promotional_text: "promotionalText"
11
+ release_notes: "whats_new",
12
+ support_url: "support_url",
13
+ marketing_url: "marketing_url",
14
+ promotional_text: "promotional_text"
15
15
  }
16
16
 
17
17
  # Everything attached to the version but not being localised
@@ -23,14 +23,19 @@ module Deliver
23
23
  LOCALISED_APP_VALUES = {
24
24
  name: "name",
25
25
  subtitle: "subtitle",
26
- privacy_url: "privacyPolicyUrl",
27
- apple_tv_privacy_policy: "privacyPolicyText"
26
+ privacy_url: "privacy_policy_url",
27
+ apple_tv_privacy_policy: "privacy_policy_text"
28
28
  }
29
29
 
30
30
  # Non localized app details values
31
- NON_LOCALISED_APP_VALUES = [:primary_category, :secondary_category,
32
- :primary_first_sub_category, :primary_second_sub_category,
33
- :secondary_first_sub_category, :secondary_second_sub_category]
31
+ NON_LOCALISED_APP_VALUES = {
32
+ primary_category: :primary_category,
33
+ secondary_category: :secondary_category,
34
+ primary_first_sub_category: :primary_subcategory_one,
35
+ primary_second_sub_category: :primary_subcategory_two,
36
+ secondary_first_sub_category: :secondary_subcategory_one,
37
+ secondary_second_sub_category: :secondary_subcategory_two
38
+ }
34
39
 
35
40
  # Review information values
36
41
  REVIEW_INFORMATION_VALUES_LEGACY = {
@@ -43,12 +48,12 @@ module Deliver
43
48
  review_notes: :notes
44
49
  }
45
50
  REVIEW_INFORMATION_VALUES = {
46
- first_name: "contactFirstName",
47
- last_name: "contactLastName",
48
- phone_number: "contactPhone",
49
- email_address: "contactEmail",
50
- demo_user: "demoAccountName",
51
- demo_password: "demoAccountPassword",
51
+ first_name: "contact_first_name",
52
+ last_name: "contact_last_name",
53
+ phone_number: "contact_phone",
54
+ email_address: "contact_email",
55
+ demo_user: "demo_account_name",
56
+ demo_password: "demo_account_password",
52
57
  notes: "notes"
53
58
  }
54
59
 
@@ -74,9 +79,7 @@ module Deliver
74
79
  def upload(options)
75
80
  return if options[:skip_metadata]
76
81
 
77
- legacy_app = options[:app]
78
- app_id = legacy_app.apple_id
79
- app = Spaceship::ConnectAPI::App.get(app_id: app_id)
82
+ app = options[:app]
80
83
 
81
84
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
82
85
 
@@ -175,6 +178,11 @@ module Deliver
175
178
  end
176
179
  non_localized_version_attributes['releaseType'] = release_type
177
180
 
181
+ # Update app store version
182
+ # This needs to happen before updating localizations (https://openradar.appspot.com/radar?id=4925914991296512)
183
+ UI.message("Uploading metadata to App Store Connect for version")
184
+ version.update(attributes: non_localized_version_attributes)
185
+
178
186
  # Update app store version localizations
179
187
  app_store_version_localizations.each do |app_store_version_localization|
180
188
  attributes = localized_version_attributes_by_locale[app_store_version_localization.locale]
@@ -193,10 +201,6 @@ module Deliver
193
201
  end
194
202
  end
195
203
 
196
- # Update app store version
197
- UI.message("Uploading metadata to App Store Connect for version")
198
- version.update(attributes: non_localized_version_attributes)
199
-
200
204
  # Update categories
201
205
  app_info = app.fetch_edit_app_info
202
206
  if app_info
@@ -271,7 +275,7 @@ module Deliver
271
275
  next if k.nil? || v.nil?
272
276
  next if k == v
273
277
  has_mapped_values = true
274
- UI.deprecated("Category '#{k}' from iTunesConnect as been deprecated. Please replace with '#{v}'")
278
+ UI.deprecated("Category '#{k}' from iTunesConnect has been deprecated. Please replace with '#{v}'")
275
279
  end
276
280
  UI.deprecated("You can find more info at https://docs.fastlane.tools/actions/deliver/#reference") if has_mapped_values
277
281
 
@@ -494,7 +498,7 @@ module Deliver
494
498
  end
495
499
 
496
500
  # Load non localised data
497
- (NON_LOCALISED_VERSION_VALUES.keys + NON_LOCALISED_APP_VALUES).each do |key|
501
+ (NON_LOCALISED_VERSION_VALUES.keys + NON_LOCALISED_APP_VALUES.keys).each do |key|
498
502
  path = File.join(options[:metadata_path], "#{key}.txt")
499
503
  next unless File.exist?(path)
500
504
 
@@ -541,10 +545,10 @@ module Deliver
541
545
  attributes[attribute_name] = strip_value unless strip_value.empty?
542
546
  end
543
547
 
544
- if !attributes["demoAccountName"].to_s.empty? && !attributes["demoAccountPassword"].to_s.empty?
545
- attributes["demoAccountRequired"] = true
548
+ if !attributes["demo_account_name"].to_s.empty? && !attributes["demo_account_password"].to_s.empty?
549
+ attributes["demo_account_required"] = true
546
550
  else
547
- attributes["demoAccountRequired"] = false
551
+ attributes["demo_account_required"] = false
548
552
  end
549
553
 
550
554
  UI.message("Uploading app review information to App Store Connect")
@@ -610,7 +614,7 @@ module Deliver
610
614
  next if k.nil? || v.nil?
611
615
  next if k == v
612
616
  has_mapped_values = true
613
- UI.deprecated("Age rating '#{k}' from iTunesConnect as been deprecated. Please replace with '#{v}'")
617
+ UI.deprecated("Age rating '#{k}' from iTunesConnect has been deprecated. Please replace with '#{v}'")
614
618
  end
615
619
  UI.deprecated("You can find more info at https://docs.fastlane.tools/actions/deliver/#reference") if has_mapped_values
616
620
 
@@ -9,9 +9,7 @@ module Deliver
9
9
 
10
10
  price_tier = options[:price_tier].to_s
11
11
 
12
- legacy_app = options[:app]
13
- app_id = legacy_app.apple_id
14
- app = Spaceship::ConnectAPI::App.get(app_id: app_id)
12
+ app = options[:app]
15
13
 
16
14
  attributes = {}
17
15
  territory_ids = []
@@ -12,9 +12,7 @@ module Deliver
12
12
  return if options[:skip_screenshots]
13
13
  return if options[:edit_live]
14
14
 
15
- legacy_app = options[:app]
16
- app_id = legacy_app.apple_id
17
- app = Spaceship::ConnectAPI::App.get(app_id: app_id)
15
+ app = options[:app]
18
16
 
19
17
  platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
20
18
  version = app.get_edit_app_store_version(platform: platform)
@@ -28,47 +26,7 @@ module Deliver
28
26
  localizations = version.get_app_store_version_localizations
29
27
 
30
28
  if options[:overwrite_screenshots]
31
- # Get localizations on version
32
- localizations.each do |localization|
33
- # Only delete screenshots if trying to upload
34
- next unless screenshots_per_language.keys.include?(localization.locale)
35
-
36
- # Iterate over all screenshots for each set and delete
37
- screenshot_sets = localization.get_app_screenshot_sets
38
-
39
- # Multi threading delete on single localization
40
- threads = []
41
- errors = []
42
-
43
- screenshot_sets.each do |screenshot_set|
44
- UI.message("Removing all previously uploaded screenshots for '#{localization.locale}' '#{screenshot_set.screenshot_display_type}'...")
45
- screenshot_set.app_screenshots.each do |screenshot|
46
- UI.verbose("Deleting screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
47
- threads << Thread.new do
48
- begin
49
- screenshot.delete!
50
- UI.verbose("Deleted screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
51
- rescue => error
52
- UI.verbose("Failed to delete screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
53
- errors << error
54
- end
55
- end
56
- end
57
- end
58
-
59
- sleep(1) # Feels bad but sleeping a bit to let the threads catchup
60
-
61
- unless threads.empty?
62
- Helper.show_loading_indicator("Waiting for screenshots to be deleted for '#{localization.locale}'... (might be slow)") unless FastlaneCore::Globals.verbose?
63
- threads.each(&:join)
64
- Helper.hide_loading_indicator unless FastlaneCore::Globals.verbose?
65
- end
66
-
67
- # Crash if any errors happen while deleting
68
- errors.each do |error|
69
- UI.error(error.message)
70
- end
71
- end
29
+ delete_screenshots(localizations, screenshots_per_language)
72
30
  end
73
31
 
74
32
  # Finding languages to enable
@@ -95,6 +53,79 @@ module Deliver
95
53
  upload_screenshots(screenshots_per_language, localizations, options)
96
54
  end
97
55
 
56
+ def delete_screenshots(localizations, screenshots_per_language, tries: 5)
57
+ tries -= 1
58
+
59
+ # Get localizations on version
60
+ localizations.each do |localization|
61
+ # Only delete screenshots if trying to upload
62
+ next unless screenshots_per_language.keys.include?(localization.locale)
63
+
64
+ # Iterate over all screenshots for each set and delete
65
+ screenshot_sets = localization.get_app_screenshot_sets
66
+
67
+ # Multi threading delete on single localization
68
+ threads = []
69
+ errors = []
70
+
71
+ screenshot_sets.each do |screenshot_set|
72
+ UI.message("Removing all previously uploaded screenshots for '#{localization.locale}' '#{screenshot_set.screenshot_display_type}'...")
73
+ screenshot_set.app_screenshots.each do |screenshot|
74
+ UI.verbose("Deleting screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
75
+ threads << Thread.new do
76
+ begin
77
+ screenshot.delete!
78
+ UI.verbose("Deleted screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
79
+ rescue => error
80
+ UI.verbose("Failed to delete screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
81
+ errors << error
82
+ end
83
+ end
84
+ end
85
+ end
86
+
87
+ sleep(1) # Feels bad but sleeping a bit to let the threads catchup
88
+
89
+ unless threads.empty?
90
+ Helper.show_loading_indicator("Waiting for screenshots to be deleted for '#{localization.locale}'... (might be slow)") unless FastlaneCore::Globals.verbose?
91
+ threads.each(&:join)
92
+ Helper.hide_loading_indicator unless FastlaneCore::Globals.verbose?
93
+ end
94
+
95
+ # Crash if any errors happen while deleting
96
+ errors.each do |error|
97
+ UI.error(error.message)
98
+ end
99
+ end
100
+
101
+ # Verify all screenshots have been deleted
102
+ # Sometimes API requests will fail but screenshots will still be deleted
103
+ count = count_screenshots(localizations)
104
+ UI.important("Number of screenshots not deleted: #{count}")
105
+ if count > 0
106
+ if tries.zero?
107
+ UI.user_error!("Failed verification of all screenshots deleted... #{count} screenshot(s) still exist")
108
+ else
109
+ UI.error("Failed to delete all screenshots... Tries remaining: #{tries}")
110
+ delete_screenshots(localizations, screenshots_per_language, tries: tries)
111
+ end
112
+ else
113
+ UI.message("Successfully deleted all screenshots")
114
+ end
115
+ end
116
+
117
+ def count_screenshots(localizations)
118
+ count = 0
119
+ localizations.each do |localization|
120
+ screenshot_sets = localization.get_app_screenshot_sets
121
+ screenshot_sets.each do |screenshot_set|
122
+ count += screenshot_set.app_screenshots.size
123
+ end
124
+ end
125
+
126
+ return count
127
+ end
128
+
98
129
  def upload_screenshots(screenshots_per_language, localizations, options)
99
130
  # Check if should wait for processing
100
131
  # Default to waiting if submitting for review (since needed for submission)
@@ -112,7 +143,7 @@ module Deliver
112
143
  UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=true to skip waiting for screenshots to process")
113
144
  else
114
145
  UI.important("Skipping the wait for screenshot image processing (which may affect submission)")
115
- UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=false to skip waiting for screenshots to process")
146
+ UI.important("Set env DELIVER_SKIP_WAIT_FOR_SCREENSHOT_PROCESSING=false to wait for screenshots to process")
116
147
  end
117
148
 
118
149
  # Upload screenshots
@@ -135,7 +135,7 @@ The general parameters are defined in the `default` key and can be:
135
135
  | `show_complete_frame` | Specifies whether _frameit_ should shrink the device frame so that it is completely shown in the framed screenshot. If it is false, clipping of the device frame might occur at the bottom (when `title_below_image` is `false`) or top (when `title_below_image` is `true`) of the framed screenshot. | `false` |
136
136
  | `padding` | The content of the framed screenshot will be resized to match the specified `padding` around all edges. The vertical padding is also applied between the text and the top or bottom (depending on `title_below_image`) of the device frame. <p> There are 3 different options of specyfying the padding: <p> 1. Default: An integer value that defines both horizontal and vertical padding in pixels. <br> 2. A string that defines (different) padding values in pixels for horizontal and vertical padding. The syntax is `"<horizontal>x<vertical>"`, e.g. `"30x60"`. <br> 3. A string that defines (different) padding values in percentage for horizontal and vertical padding. The syntax is `"<horizontal>%x<vertical>%"`, e.g. `"5%x10%"`. <br> **Note:** The percentage is calculated from the smallest image dimension (height or width). <p> A combination of option 2 and 3 is possible, e.g. `"5%x40"`. | `50` |
137
137
  | `interline_spacing` | Specifies whether _frameit_ should add or subtract this many pixels between the individual lines of text. This only applies to a multi-line `title` and/or `keyword` to expand or squash together the individual lines of text. | `0` |
138
- | `font_scale_factor` | Specifies whether _frameit_ should increase or decrease the font size of the text. | `0.1` |
138
+ | `font_scale_factor` | Specifies whether _frameit_ should increase or decrease the font size of the text. Is ignored for `keyword` or `title`, if `font_size` is specified. | `0.1` |
139
139
  | `frame` | Overrides the color of the frame to be used. (Valid values are `BLACK`, `WHITE`, `GOLD` and `ROSE_GOLD`) | NA |
140
140
  | `title_min_height` | Specifies a height always reserved for the title. Value can be a percentage of the height or an absolute value. The device will be placed below (or above) this area. Convenient to ensure the device top (or bottom) will be consistently placed at the same height on the different screenshots. | NA |
141
141
  | `use_platform` | Overrides the platform used for the screenshot. Valid values are `IOS`, `ANDROID` and `ANY`. | `IOS` |
@@ -163,6 +163,7 @@ The `keyword` and `title` parameters are both used in `default` and `data`. They
163
163
  |-----|-------------|---------------|
164
164
  | `color` | The font color for the text. Specify a hex/html color code. | `#000000` (black) |
165
165
  | `font` | The font family for the text. Specify the (relative) path to the font file (e.g. an OpenType Font). | The default `imagemagick` font, which is system dependent. |
166
+ | `font_size` | The font size for the text specified in points. If not specified or `0`, font will be scaled automatically to fit the available space. _frameit_ still shrinks the text, if it would not fit. | NA |
166
167
  | `text` | The text that should be used for the `keyword` or `title`. <p> Note: If you want to use localised text, use [`.strings` files](#strings-files). | NA |
167
168
 
168
169
  ### Example
@@ -176,6 +177,7 @@ The `keyword` and `title` parameters are both used in `default` and `data`. They
176
177
  },
177
178
  "title": {
178
179
  "font": "./fonts/MyFont-Th.otf",
180
+ "font_size": 128,
179
181
  "color": "#545454"
180
182
  },
181
183
  "background": "./background.jpg",
@@ -471,7 +471,7 @@ _deliver_ allows for metadata to be set through `.txt` files in the metadata fol
471
471
 
472
472
  Key | Editable While Live | Directory | Filename
473
473
  ----|--------|--------|--------
474
- <%- (Deliver::UploadMetadata::NON_LOCALISED_VERSION_VALUES.keys + Deliver::UploadMetadata::NON_LOCALISED_APP_VALUES).each do |value| -%>
474
+ <%- (Deliver::UploadMetadata::NON_LOCALISED_VERSION_VALUES.keys + Deliver::UploadMetadata::NON_LOCALISED_APP_VALUES.keys).each do |value| -%>
475
475
  `<%= value %>` | <%= Deliver::UploadMetadata::NON_LOCALISED_LIVE_VALUES.include?(value) ? 'Yes' : 'No' %> | `<metadata_path>` | `<%= value %>.txt`
476
476
  <%- end %>
477
477
 
@@ -22,7 +22,7 @@ module Fastlane
22
22
 
23
23
  # Process options
24
24
  version = params[:version]
25
- build_number = params[:build_number]
25
+ build_number = params[:build_number].to_s unless params[:build_number].nil?
26
26
  platform = params[:platform]
27
27
  output_directory = params[:output_directory]
28
28
  wait_for_dsym_processing = params[:wait_for_dsym_processing]
@@ -258,7 +258,8 @@ module Fastlane
258
258
  short_option: "-b",
259
259
  env_name: "DOWNLOAD_DSYMS_BUILD_NUMBER",
260
260
  description: "The app build_number for dSYMs you wish to download",
261
- optional: true),
261
+ optional: true,
262
+ is_string: false),
262
263
  FastlaneCore::ConfigItem.new(key: :min_version,
263
264
  short_option: "-m",
264
265
  env_name: "DOWNLOAD_DSYMS_MIN_VERSION",
@@ -308,6 +309,7 @@ module Fastlane
308
309
  [
309
310
  'download_dsyms',
310
311
  'download_dsyms(version: "1.0.0", build_number: "345")',
312
+ 'download_dsyms(version: "1.0.1", build_number: 42)',
311
313
  'download_dsyms(version: "live")',
312
314
  'download_dsyms(min_version: "1.2.3")'
313
315
  ]
@@ -3,7 +3,10 @@ module Fastlane
3
3
  class ErbAction < Action
4
4
  def self.run(params)
5
5
  template = File.read(params[:template])
6
- result = ERB.new(template).result(OpenStruct.new(params[:placeholders]).instance_eval { binding })
6
+ trim_mode = params[:trim_mode]
7
+
8
+ result = Fastlane::ErbTemplateHelper.render(template, params[:placeholders], trim_mode)
9
+
7
10
  File.open(params[:destination], 'w') { |file| file.write(result) } if params[:destination]
8
11
  UI.message("Successfully parsed template: '#{params[:template]}' and rendered output to: #{params[:destination]}") if params[:destination]
9
12
  result
@@ -45,7 +48,12 @@ module Fastlane
45
48
  description: "Placeholders given as a hash",
46
49
  default_value: {},
47
50
  is_string: false,
48
- type: Hash)
51
+ type: Hash),
52
+ FastlaneCore::ConfigItem.new(key: :trim_mode,
53
+ short_option: "-t",
54
+ env_name: "FL_ERB_TRIM_MODE",
55
+ description: "Trim mode applied to the ERB",
56
+ optional: true)
49
57
 
50
58
  ]
51
59
  end
@@ -1,7 +1,10 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  module SharedValues
4
- GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH APPCENTER_BRANCH).freeze
4
+ GIT_BRANCH_ENV_VARS = %w(GIT_BRANCH BRANCH_NAME TRAVIS_BRANCH BITRISE_GIT_BRANCH CI_BUILD_REF_NAME CI_COMMIT_REF_NAME WERCKER_GIT_BRANCH BUILDKITE_BRANCH APPCENTER_BRANCH CIRCLE_BRANCH).reject do |branch|
5
+ # Removing because tests break on CircleCI
6
+ Helper.test? && branch == "CIRCLE_BRANCH"
7
+ end.freeze
5
8
  end
6
9
 
7
10
  class GitBranchAction < Action
@@ -5,15 +5,23 @@ module Fastlane
5
5
  require 'pilot'
6
6
  require 'pilot/options'
7
7
 
8
+ distribute_only = values[:distribute_only]
9
+
8
10
  changelog = Actions.lane_context[SharedValues::FL_CHANGELOG]
9
11
  values[:changelog] ||= changelog if changelog
10
12
 
11
- values[:ipa] ||= Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
12
- values[:ipa] = File.expand_path(values[:ipa]) if values[:ipa]
13
+ unless distribute_only
14
+ values[:ipa] ||= Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
15
+ values[:ipa] = File.expand_path(values[:ipa]) if values[:ipa]
16
+ end
13
17
 
14
18
  return values if Helper.test?
15
19
 
16
- Pilot::BuildManager.new.upload(values) # we already have the finished config
20
+ if distribute_only
21
+ Pilot::BuildManager.new.distribute(values) # we already have the finished config
22
+ else
23
+ Pilot::BuildManager.new.upload(values) # we already have the finished config
24
+ end
17
25
  end
18
26
 
19
27
  #####################################################
@@ -66,7 +66,7 @@ module Fastlane
66
66
  end
67
67
 
68
68
  def create_credentials
69
- return nil if access_key.nil? || secret_access_key.nil?
69
+ return nil if access_key.to_s.empty? || secret_access_key.to_s.empty?
70
70
 
71
71
  Aws::Credentials.new(
72
72
  access_key,