fastlane 2.149.1 → 2.150.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deliver/lib/deliver.rb +0 -1
- data/deliver/lib/deliver/app_screenshot.rb +26 -25
- data/deliver/lib/deliver/options.rb +6 -11
- data/deliver/lib/deliver/runner.rb +7 -4
- data/deliver/lib/deliver/setup.rb +5 -30
- data/deliver/lib/deliver/submit_for_review.rb +124 -87
- data/deliver/lib/deliver/upload_metadata.rb +284 -143
- data/deliver/lib/deliver/upload_price_tier.rb +15 -8
- data/deliver/lib/deliver/upload_screenshots.rb +86 -37
- data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
- data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +3 -11
- data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +3 -2
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -1
- data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
- data/fastlane/lib/fastlane/actions/slack.rb +1 -1
- data/fastlane/lib/fastlane/actions/spm.rb +7 -0
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -32
- data/fastlane/lib/fastlane/lane.rb +3 -3
- data/fastlane/lib/fastlane/swift_fastlane_function.rb +8 -4
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane/swift/ControlCommand.swift +1 -0
- data/fastlane/swift/Fastlane.swift +48 -12
- data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +3 -9
- data/fastlane/swift/LaneFileProtocol.swift +2 -5
- data/fastlane/swift/MatchfileProtocol.swift +1 -1
- data/fastlane/swift/RubyCommand.swift +29 -6
- data/fastlane/swift/RubyCommandable.swift +1 -0
- data/fastlane/swift/Runner.swift +85 -13
- data/fastlane/swift/ScanfileProtocol.swift +1 -1
- data/fastlane/swift/SnapshotfileProtocol.swift +3 -3
- data/fastlane/swift/SocketClient.swift +76 -45
- data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
- data/fastlane/swift/SocketResponse.swift +1 -0
- data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -3
- data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +7 -0
- data/frameit/lib/frameit/device_types.rb +100 -100
- data/produce/lib/produce/itunes_connect.rb +20 -20
- data/produce/lib/produce/options.rb +3 -3
- data/sigh/lib/assets/resign.sh +7 -7
- data/snapshot/lib/assets/SnapshotHelper.swift +5 -5
- data/snapshot/lib/assets/SnapshotHelperXcode8.swift +3 -3
- data/snapshot/lib/snapshot/options.rb +0 -1
- data/snapshot/lib/snapshot/reports_generator.rb +8 -1
- data/spaceship/lib/spaceship/.DS_Store +0 -0
- data/spaceship/lib/spaceship/connect_api.rb +21 -2
- data/spaceship/lib/spaceship/connect_api/client.rb +47 -11
- data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
- data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +109 -0
- data/spaceship/lib/spaceship/connect_api/models/app.rb +113 -3
- data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info.rb +74 -0
- data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +38 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
- data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
- data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +81 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +117 -0
- data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +101 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +182 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +70 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +36 -0
- data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
- data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +40 -0
- data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
- data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +10 -3
- data/spaceship/lib/spaceship/connect_api/tunes/client.rb +33 -0
- data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +703 -0
- data/spaceship/lib/spaceship/spaceauth_runner.rb +2 -2
- data/supply/lib/supply/client.rb +19 -0
- data/supply/lib/supply/reader.rb +16 -0
- metadata +27 -24
- data/deliver/lib/deliver/upload_assets.rb +0 -27
- data/scan/lib/scan/.test_command_generator.rb.swp +0 -0
- data/snapshot/lib/snapshot/.test_command_generator_base.rb.swp +0 -0
@@ -1,23 +1,30 @@
|
|
1
1
|
require_relative 'module'
|
2
|
+
require 'spaceship'
|
2
3
|
|
3
4
|
module Deliver
|
4
5
|
# Set the app's pricing
|
5
6
|
class UploadPriceTier
|
6
7
|
def upload(options)
|
7
8
|
return unless options[:price_tier]
|
8
|
-
app = options[:app]
|
9
9
|
|
10
|
-
|
11
|
-
options[:price_tier] = options[:price_tier].to_s
|
10
|
+
price_tier = options[:price_tier].to_s
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
legacy_app = options[:app]
|
13
|
+
app_id = legacy_app.apple_id
|
14
|
+
app = Spaceship::ConnectAPI::App.get(app_id: app_id)
|
15
|
+
|
16
|
+
app_prices = app.fetch_app_prices
|
17
|
+
if app_prices.first
|
18
|
+
old_price = app_prices.first.id
|
19
|
+
end
|
20
|
+
|
21
|
+
if price_tier == old_price
|
22
|
+
UI.success("Price Tier unchanged (tier #{old_price})")
|
16
23
|
return
|
17
24
|
end
|
18
25
|
|
19
|
-
app.
|
20
|
-
UI.success("Successfully updated the pricing from #{old_price} to #{
|
26
|
+
app.update_app_price_tier(app_price_tier_id: price_tier)
|
27
|
+
UI.success("Successfully updated the pricing from #{old_price} to #{price_tier}")
|
21
28
|
end
|
22
29
|
end
|
23
30
|
end
|
@@ -11,69 +11,118 @@ module Deliver
|
|
11
11
|
return if options[:skip_screenshots]
|
12
12
|
return if options[:edit_live]
|
13
13
|
|
14
|
-
|
14
|
+
legacy_app = options[:app]
|
15
|
+
app_id = legacy_app.apple_id
|
16
|
+
app = Spaceship::ConnectAPI::App.get(app_id: app_id)
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
+
platform = Spaceship::ConnectAPI::Platform.map(options[:platform])
|
19
|
+
version = app.get_edit_app_store_version(platform: platform)
|
20
|
+
UI.user_error!("Could not find a version to edit for app '#{app.name}' for '#{platform}'") unless version
|
21
|
+
|
22
|
+
UI.important("Will begin uploading snapshots for '#{version.version_string}' on App Store Connect")
|
18
23
|
|
19
24
|
UI.message("Starting with the upload of screenshots...")
|
20
25
|
screenshots_per_language = screenshots.group_by(&:language)
|
21
26
|
|
27
|
+
localizations = version.get_app_store_version_localizations
|
28
|
+
|
22
29
|
if options[:overwrite_screenshots]
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
+
# Get localizations on version
|
31
|
+
localizations.each do |localization|
|
32
|
+
# Only delete screenshots if trying to upload
|
33
|
+
next unless screenshots_per_language.keys.include?(localization.locale)
|
34
|
+
|
35
|
+
# Iterate over all screenshots for each set and delete
|
36
|
+
screenshot_sets = localization.get_app_screenshot_sets
|
37
|
+
screenshot_sets.each do |screenshot_set|
|
38
|
+
UI.message("Removing all previously uploaded screenshots for '#{localization.locale}' '#{screenshot_set.screenshot_display_type}'...")
|
39
|
+
screenshot_set.app_screenshots.each do |screenshot|
|
40
|
+
UI.verbose("Deleting screenshot - #{localization.locale} #{screenshot_set.screenshot_display_type} #{screenshot.id}")
|
41
|
+
screenshot.delete!
|
42
|
+
end
|
30
43
|
end
|
31
44
|
end
|
32
45
|
end
|
33
46
|
|
34
|
-
#
|
35
|
-
|
47
|
+
# Finding languages to enable
|
48
|
+
languages = screenshots_per_language.keys
|
49
|
+
locales_to_enable = languages - localizations.map(&:locale)
|
36
50
|
|
37
|
-
|
38
|
-
if enabled_languages.count > 0
|
39
|
-
v.create_languages(enabled_languages)
|
51
|
+
if locales_to_enable.count > 0
|
40
52
|
lng_text = "language"
|
41
|
-
lng_text += "s" if
|
42
|
-
Helper.show_loading_indicator("Activating #{lng_text} #{
|
43
|
-
|
44
|
-
|
45
|
-
|
53
|
+
lng_text += "s" if locales_to_enable.count != 1
|
54
|
+
Helper.show_loading_indicator("Activating #{lng_text} #{locales_to_enable.join(', ')}...")
|
55
|
+
|
56
|
+
locales_to_enable.each do |locale|
|
57
|
+
version.create_app_store_version_localization(attributes: {
|
58
|
+
locale: locale
|
59
|
+
})
|
60
|
+
end
|
61
|
+
|
46
62
|
Helper.hide_loading_indicator
|
63
|
+
|
64
|
+
# Refresh version localizations
|
65
|
+
localizations = version.get_app_store_version_localizations
|
47
66
|
end
|
48
67
|
|
68
|
+
# Upload screenshots
|
69
|
+
indized = {} # per language and device type
|
70
|
+
|
49
71
|
screenshots_per_language.each do |language, screenshots_for_language|
|
72
|
+
# Find localization to upload screenshots to
|
73
|
+
localization = localizations.find do |l|
|
74
|
+
l.locale == language
|
75
|
+
end
|
76
|
+
|
77
|
+
unless localization
|
78
|
+
UI.error("Couldn't find localization on version for #{language}")
|
79
|
+
next
|
80
|
+
end
|
81
|
+
|
82
|
+
indized[localization.locale] ||= {}
|
83
|
+
|
84
|
+
# Create map to find screenshot set to add screenshot to
|
85
|
+
app_screenshot_sets_map = {}
|
86
|
+
app_screenshot_sets = localization.get_app_screenshot_sets
|
87
|
+
app_screenshot_sets.each do |app_screenshot_set|
|
88
|
+
app_screenshot_sets_map[app_screenshot_set.screenshot_display_type] = app_screenshot_set
|
89
|
+
|
90
|
+
# Set initial screnshot count
|
91
|
+
indized[localization.locale][app_screenshot_set.screenshot_display_type] ||= app_screenshot_set.app_screenshots.size
|
92
|
+
end
|
93
|
+
|
50
94
|
UI.message("Uploading #{screenshots_for_language.length} screenshots for language #{language}")
|
51
95
|
screenshots_for_language.each do |screenshot|
|
52
|
-
|
53
|
-
|
54
|
-
indized[screenshot.language][screenshot.formatted_name] += 1 # we actually start with 1... wtf iTC
|
96
|
+
display_type = screenshot.device_type
|
97
|
+
set = app_screenshot_sets_map[display_type]
|
55
98
|
|
56
|
-
|
99
|
+
if display_type.nil?
|
100
|
+
UI.error("Error... Screenshot size #{screenshot.screen_size} not valid for App Store Connect")
|
101
|
+
next
|
102
|
+
end
|
57
103
|
|
58
|
-
|
104
|
+
unless set
|
105
|
+
set = localization.create_app_screenshot_set(attributes: {
|
106
|
+
screenshotDisplayType: display_type
|
107
|
+
})
|
108
|
+
app_screenshot_sets_map[display_type] = set
|
109
|
+
|
110
|
+
indized[localization.locale][set.screenshot_display_type] = 0
|
111
|
+
end
|
112
|
+
|
113
|
+
index = indized[localization.locale][set.screenshot_display_type]
|
114
|
+
|
115
|
+
if index >= 10
|
59
116
|
UI.error("Too many screenshots found for device '#{screenshot.formatted_name}' in '#{screenshot.language}', skipping this one (#{screenshot.path})")
|
60
117
|
next
|
61
118
|
end
|
62
119
|
|
120
|
+
indized[localization.locale][set.screenshot_display_type] += 1
|
121
|
+
|
122
|
+
# Also.. what is the messages type even for?
|
63
123
|
UI.message("Uploading '#{screenshot.path}'...")
|
64
|
-
|
65
|
-
index,
|
66
|
-
screenshot.language,
|
67
|
-
screenshot.device_type,
|
68
|
-
screenshot.is_messages?)
|
124
|
+
set.upload_screenshot(path: screenshot.path)
|
69
125
|
end
|
70
|
-
# ideally we should only save once, but itunes server can't cope it seems
|
71
|
-
# so we save per language. See issue #349
|
72
|
-
Helper.show_loading_indicator("Saving changes")
|
73
|
-
v.save!
|
74
|
-
# Refresh app version to start clean again. See issue #9859
|
75
|
-
v = app.edit_version
|
76
|
-
Helper.hide_loading_indicator
|
77
126
|
end
|
78
127
|
UI.success("Successfully uploaded screenshots to App Store Connect")
|
79
128
|
end
|
@@ -364,7 +364,7 @@ snapshot(launch_arguments: ["SKIP_ANIMATIONS"])
|
|
364
364
|
```
|
365
365
|
|
366
366
|
By default, _snapshot_ will wait for a short time for the animations to finish.
|
367
|
-
If you're skipping the animations, this
|
367
|
+
If you're skipping the animations, this wait time is unnecessary and can be skipped:
|
368
368
|
|
369
369
|
```swift
|
370
370
|
setupSnapshot(app, waitForAnimations: false)
|
@@ -467,7 +467,7 @@ _deliver_ allows for metadata to be set through `.txt` files in the metadata fol
|
|
467
467
|
|
468
468
|
Key | Editable While Live | Directory | Filename
|
469
469
|
----|--------|--------|--------
|
470
|
-
<%- (Deliver::UploadMetadata::NON_LOCALISED_VERSION_VALUES + Deliver::UploadMetadata::NON_LOCALISED_APP_VALUES).each do |value| -%>
|
470
|
+
<%- (Deliver::UploadMetadata::NON_LOCALISED_VERSION_VALUES.keys + Deliver::UploadMetadata::NON_LOCALISED_APP_VALUES).each do |value| -%>
|
471
471
|
`<%= value %>` | <%= Deliver::UploadMetadata::NON_LOCALISED_LIVE_VALUES.include?(value) ? 'Yes' : 'No' %> | `<metadata_path>` | `<%= value %>.txt`
|
472
472
|
<%- end %>
|
473
473
|
|
@@ -475,23 +475,15 @@ Key | Editable While Live | Directory | Filename
|
|
475
475
|
|
476
476
|
Key | Editable While Live | Directory | Filename
|
477
477
|
----|--------|--------|--------
|
478
|
-
<%- (Deliver::UploadMetadata::LOCALISED_APP_VALUES + Deliver::UploadMetadata::LOCALISED_VERSION_VALUES).each do |value| -%>
|
478
|
+
<%- (Deliver::UploadMetadata::LOCALISED_APP_VALUES.keys + Deliver::UploadMetadata::LOCALISED_VERSION_VALUES.keys).each do |value| -%>
|
479
479
|
`<%= value %>` | <%= Deliver::UploadMetadata::LOCALISED_LIVE_VALUES.include?(value) ? 'Yes' : 'No' %> | `<metadata_path>/<lang>/` | `<%= value %>.txt`
|
480
480
|
<%- end %>
|
481
481
|
|
482
|
-
### Trade Representative Contact Information Metadata
|
483
|
-
|
484
|
-
Key | Editable While Live | Directory | Filename
|
485
|
-
----|--------|--------|--------
|
486
|
-
<%- Deliver::UploadMetadata::TRADE_REPRESENTATIVE_CONTACT_INFORMATION_VALUES.each do |key, value| -%>
|
487
|
-
`<%= value %>` | Yes | `<metadata_path>/<%= Deliver::UploadMetadata::TRADE_REPRESENTATIVE_CONTACT_INFORMATION_DIR %>` | `<%= value %>.txt`
|
488
|
-
<%- end %>
|
489
|
-
|
490
482
|
### Review Information Metadata
|
491
483
|
|
492
484
|
Key | Editable While Live | Directory | Filename
|
493
485
|
----|--------|--------|--------
|
494
|
-
<%- Deliver::UploadMetadata::
|
486
|
+
<%- Deliver::UploadMetadata::REVIEW_INFORMATION_VALUES_LEGACY.each do |key, value| -%>
|
495
487
|
`<%= value %>` | Yes | `<metadata_path>/<%= Deliver::UploadMetadata::REVIEW_INFORMATION_DIR %>` | `<%= value %>.txt`
|
496
488
|
<%- end %>
|
497
489
|
|
@@ -171,9 +171,10 @@ A common Play publishing scenario might involve uploading an APK version to a te
|
|
171
171
|
|
172
172
|
This can be done using the `--track_promote_to` parameter. The `--track_promote_to` parameter works with the `--track` parameter to command the Play API to promote existing Play track APK version(s) (those active on the track identified by the `--track` param value) to a new track (`--track_promote_to` value).
|
173
173
|
|
174
|
-
## Retrieve Track Version Codes
|
174
|
+
## Retrieve Track Release Names & Version Codes
|
175
175
|
|
176
|
-
Before performing a new APK upload you may want to check existing track version codes, or you may simply want to provide an informational lane that displays the currently promoted version codes for the production track. You can use the `google_play_track_version_codes` action to retrieve existing version codes for a package and track.
|
176
|
+
Before performing a new APK upload you may want to check existing track version codes or release names, or you may simply want to provide an informational lane that displays the currently promoted version codes or release name for the production track. You can use the `google_play_track_version_codes` action to retrieve existing version codes for a package and track. You can use the `google_play_track_release_names` action to retrieve existing release names for a package and track.
|
177
|
+
For more information, see the `fastlane action google_play_track_version_codes` and `fastlane action google_play_track_release_names` help output.
|
177
178
|
|
178
179
|
## Migration from AndroidPublisherV2 to AndroidPublisherV3 in _fastlane_ 2.135.0
|
179
180
|
|
@@ -164,7 +164,13 @@ module Fastlane
|
|
164
164
|
|
165
165
|
def self.download_file(url)
|
166
166
|
uri = URI.parse(url)
|
167
|
-
|
167
|
+
if ENV['http_proxy']
|
168
|
+
UI.verbose("Found 'http_proxy' environment variable so connect via proxy")
|
169
|
+
proxy_uri = URI.parse(ENV['http_proxy'])
|
170
|
+
http = Net::HTTP.new(uri.host, uri.port, proxy_uri.host, proxy_uri.port)
|
171
|
+
else
|
172
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
173
|
+
end
|
168
174
|
http.use_ssl = (uri.scheme == "https")
|
169
175
|
res = http.get(uri.request_uri)
|
170
176
|
res.body
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
class GooglePlayTrackReleaseNamesAction < Action
|
4
|
+
# Supply::Options.available_options keys that apply to this action.
|
5
|
+
OPTIONS = [
|
6
|
+
:package_name,
|
7
|
+
:track,
|
8
|
+
:key,
|
9
|
+
:issuer,
|
10
|
+
:json_key,
|
11
|
+
:json_key_data,
|
12
|
+
:root_url,
|
13
|
+
:timeout
|
14
|
+
]
|
15
|
+
|
16
|
+
def self.run(params)
|
17
|
+
require 'supply'
|
18
|
+
require 'supply/options'
|
19
|
+
require 'supply/reader'
|
20
|
+
|
21
|
+
Supply.config = params
|
22
|
+
|
23
|
+
release_names = Supply::Reader.new.track_release_names || []
|
24
|
+
return release_names.compact
|
25
|
+
end
|
26
|
+
|
27
|
+
#####################################################
|
28
|
+
# @!group Documentation
|
29
|
+
#####################################################
|
30
|
+
|
31
|
+
def self.description
|
32
|
+
"Retrieves release names for a Google Play track"
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.details
|
36
|
+
"More information: [https://docs.fastlane.tools/actions/supply/](https://docs.fastlane.tools/actions/supply/)"
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.available_options
|
40
|
+
require 'supply'
|
41
|
+
require 'supply/options'
|
42
|
+
|
43
|
+
Supply::Options.available_options.select do |option|
|
44
|
+
OPTIONS.include?(option.key)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.output
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.return_value
|
52
|
+
"Array of strings representing the release names for the given Google Play track"
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.authors
|
56
|
+
["raldred"]
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.is_supported?(platform)
|
60
|
+
platform == :android
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.example_code
|
64
|
+
[
|
65
|
+
'google_play_track_release_names'
|
66
|
+
]
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.category
|
70
|
+
:misc
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -159,7 +159,7 @@ module Fastlane
|
|
159
159
|
"Build Date" => Time.new.to_s,
|
160
160
|
"Built by" => "Jenkins",
|
161
161
|
},
|
162
|
-
default_payloads: [:git_branch, :git_author], # Optional, lets you specify
|
162
|
+
default_payloads: [:git_branch, :git_author], # Optional, lets you specify an allowlist of default payloads to include. Pass an empty array to suppress all the default payloads.
|
163
163
|
# Don\'t add this key, or pass nil, if you want all the default payloads. The available default payloads are: `lane`, `test_result`, `git_branch`, `git_author`, `last_git_commit`, `last_git_commit_hash`.
|
164
164
|
attachment_properties: { # Optional, lets you specify any other properties available for attachments in the slack API (see https://api.slack.com/docs/attachments).
|
165
165
|
# This hash is deep merged with the existing properties set using the other properties above. This allows your own fields properties to be appended to the existing fields that were created using the `payload` property for instance.
|
@@ -8,6 +8,7 @@ module Fastlane
|
|
8
8
|
cmd << "--build-path #{params[:build_path]}" if params[:build_path]
|
9
9
|
cmd << "--package-path #{params[:package_path]}" if params[:package_path]
|
10
10
|
cmd << "--configuration #{params[:configuration]}" if params[:configuration]
|
11
|
+
cmd << "--disable-sandbox" if params[:disable_sandbox]
|
11
12
|
cmd << "--verbose" if params[:verbose]
|
12
13
|
cmd << params[:command] if package_commands.include?(params[:command])
|
13
14
|
if params[:xcconfig]
|
@@ -63,6 +64,12 @@ module Fastlane
|
|
63
64
|
verify_block: proc do |value|
|
64
65
|
UI.user_error!("Please pass a valid configuration: (debug|release)") unless valid_configurations.include?(value)
|
65
66
|
end),
|
67
|
+
FastlaneCore::ConfigItem.new(key: :disable_sandbox,
|
68
|
+
env_name: "FL_SPM_DISABLE_SANDBOX",
|
69
|
+
description: "Disable using the sandbox when executing subprocesses",
|
70
|
+
optional: true,
|
71
|
+
is_string: false,
|
72
|
+
default_value: false),
|
66
73
|
FastlaneCore::ConfigItem.new(key: :xcpretty_output,
|
67
74
|
env_name: "FL_SPM_XCPRETTY_OUTPUT",
|
68
75
|
description: "Specifies the output type for xcpretty. eg. 'test', or 'simple'",
|
@@ -45,44 +45,13 @@ module Fastlane
|
|
45
45
|
# @param current_path this is a path to either a dSYM or a zipped dSYM
|
46
46
|
# this might also be either nested or not, we're flexible
|
47
47
|
def self.handle_dsym(params, current_path, max_worker_threads)
|
48
|
-
if current_path.end_with?(".dSYM")
|
48
|
+
if current_path.end_with?(".dSYM", ".zip")
|
49
49
|
upload_dsym(params, current_path)
|
50
|
-
elsif current_path.end_with?(".zip")
|
51
|
-
UI.message("Extracting '#{current_path}'...")
|
52
|
-
|
53
|
-
current_path = File.expand_path(current_path)
|
54
|
-
Dir.mktmpdir do |dir|
|
55
|
-
Dir.chdir(dir) do
|
56
|
-
Actions.sh("unzip -qo #{current_path.shellescape}")
|
57
|
-
work_q = Queue.new
|
58
|
-
Dir["*.dSYM"].each do |sub|
|
59
|
-
work_q.push(sub)
|
60
|
-
end
|
61
|
-
execute_uploads(params, max_worker_threads, work_q)
|
62
|
-
end
|
63
|
-
end
|
64
50
|
else
|
65
51
|
UI.error("Don't know how to handle '#{current_path}'")
|
66
52
|
end
|
67
53
|
end
|
68
54
|
|
69
|
-
def self.execute_uploads(params, max_worker_threads, work_q)
|
70
|
-
number_of_threads = [max_worker_threads, work_q.size].min
|
71
|
-
workers = (0...number_of_threads).map do
|
72
|
-
Thread.new do
|
73
|
-
begin
|
74
|
-
while work_q.size > 0
|
75
|
-
current_path = work_q.pop(true)
|
76
|
-
upload_dsym(params, current_path)
|
77
|
-
end
|
78
|
-
rescue => ex
|
79
|
-
UI.error(ex.to_s)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
83
|
-
workers.map(&:join)
|
84
|
-
end
|
85
|
-
|
86
55
|
def self.upload_dsym(params, path)
|
87
56
|
UI.message("Uploading '#{path}'...")
|
88
57
|
command = []
|
@@ -41,8 +41,8 @@ module Fastlane
|
|
41
41
|
class << self
|
42
42
|
# Makes sure the lane name is valid
|
43
43
|
def verify_lane_name(name)
|
44
|
-
if self.
|
45
|
-
UI.error("Lane name '#{name}' is invalid! Invalid names are #{self.
|
44
|
+
if self.deny_list.include?(name.to_s)
|
45
|
+
UI.error("Lane name '#{name}' is invalid! Invalid names are #{self.deny_list.join(', ')}.")
|
46
46
|
UI.user_error!("Lane name '#{name}' is invalid")
|
47
47
|
end
|
48
48
|
|
@@ -59,7 +59,7 @@ module Fastlane
|
|
59
59
|
self.ensure_name_not_conflicts(name.to_s)
|
60
60
|
end
|
61
61
|
|
62
|
-
def
|
62
|
+
def deny_list
|
63
63
|
%w(
|
64
64
|
run
|
65
65
|
init
|
@@ -98,7 +98,11 @@ module Fastlane
|
|
98
98
|
elsif type_override == Float
|
99
99
|
return "Float"
|
100
100
|
elsif type_override == :string_callback
|
101
|
-
|
101
|
+
# David Hart:
|
102
|
+
# It doesn't make sense to add escaping annotations to optional closures because they aren't function types:
|
103
|
+
# they are basically an enum (Optional) containing a function, the same way you would store a closure in any type:
|
104
|
+
# it's implicitly escaping because it's owned by another type.
|
105
|
+
return "((String) -> Void)?"
|
102
106
|
else
|
103
107
|
return default_type
|
104
108
|
end
|
@@ -106,7 +110,7 @@ module Fastlane
|
|
106
110
|
|
107
111
|
def override_default_value_if_not_correct_type(param_name: nil, param_type: nil, default_value: nil)
|
108
112
|
return "[]" if param_type == "[String]" && default_value == ""
|
109
|
-
return "
|
113
|
+
return "nil" if param_type == "((String) -> Void)?"
|
110
114
|
|
111
115
|
return default_value
|
112
116
|
end
|
@@ -121,7 +125,7 @@ module Fastlane
|
|
121
125
|
|
122
126
|
optional_specifier = ""
|
123
127
|
# if we are optional and don't have a default value, we'll need to use ?
|
124
|
-
optional_specifier = "?" if (optional && default_value.nil?) && type != "((String) -> Void)"
|
128
|
+
optional_specifier = "?" if (optional && default_value.nil?) && type != "((String) -> Void)?"
|
125
129
|
|
126
130
|
# If we have a default value of true or false, we can infer it is a Bool
|
127
131
|
if default_value.class == FalseClass
|
@@ -162,7 +166,7 @@ module Fastlane
|
|
162
166
|
# we can't handle default values for Hashes, yet
|
163
167
|
# see method swift_default_implementations for similar behavior
|
164
168
|
default_value = "[:]"
|
165
|
-
elsif type != "Bool" && type != "[String]" && type != "Int" && type != "((String) -> Void)" && type != "Float" && type != "Double"
|
169
|
+
elsif type != "Bool" && type != "[String]" && type != "Int" && type != "@escaping ((String) -> Void)" && type != "Float" && type != "Double"
|
166
170
|
default_value = "\"#{default_value}\""
|
167
171
|
end
|
168
172
|
end
|