fastlane-plugin-create_simulator_devices 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/simctl/device.rb +4 -0
- data/lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/runner.rb +11 -1
- data/lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/runtime_helper.rb +3 -1
- data/lib/fastlane/plugin/create_simulator_devices/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53aed494d69e050f8014a9b188cf5dd2fb3475c5d8e44b7d22e21eb8949d66aa
|
4
|
+
data.tar.gz: 315fe5620703cde142b5ae0aff18cc90989398e96e2587dab89f1030bcf0ece1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68539faced67b76306b818ccb1cc3172c00245e903e234085852c22db09c683907bc94f024238c73a31c1edd869d481df7b6a174a2cf996817fa4acc598b9010
|
7
|
+
data.tar.gz: ba14fdf8693f60557079f96eead7e46cf5730f6e0cc86f7d72477185b0acbd4367851562789b0d095336104d4bc3b1dee2547fb9863cbcac041b2d650ec277e7
|
data/lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/runner.rb
CHANGED
@@ -38,7 +38,15 @@ module Fastlane
|
|
38
38
|
# Return distinct matched devices strings
|
39
39
|
matched_devices = required_devices
|
40
40
|
.reject { |required_device| required_device.available_device.nil? }
|
41
|
-
|
41
|
+
|
42
|
+
if verbose
|
43
|
+
UI.message('Matched devices:')
|
44
|
+
matched_devices.each do |matched_device|
|
45
|
+
UI.message("\n\t#{matched_device.description}: #{matched_device.available_device.description}")
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
matched_devices.map!(&:description)
|
42
50
|
|
43
51
|
UI.user_error!('No available devices found') if matched_devices.empty?
|
44
52
|
|
@@ -58,6 +66,8 @@ module Fastlane
|
|
58
66
|
|
59
67
|
available_devices = shell_helper.available_devices_for_runtimes[required_device.available_runtime.identifier.to_sym]
|
60
68
|
|
69
|
+
return [] if available_devices.nil?
|
70
|
+
|
61
71
|
available_devices.detect { |device| device.device_type_identifier == required_device.device_type.identifier }
|
62
72
|
end
|
63
73
|
|
data/lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/runtime_helper.rb
CHANGED
@@ -35,6 +35,7 @@ module Fastlane
|
|
35
35
|
end
|
36
36
|
|
37
37
|
shell_helper.available_runtimes(force: true)
|
38
|
+
shell_helper.available_devices_for_runtimes(force: true)
|
38
39
|
end
|
39
40
|
|
40
41
|
def install_missing_runtimes(required_devices)
|
@@ -51,6 +52,7 @@ module Fastlane
|
|
51
52
|
# Update available_runtimes after installing the runtimes.
|
52
53
|
shell_helper.installed_runtimes_with_state
|
53
54
|
shell_helper.available_runtimes(force: true)
|
55
|
+
shell_helper.available_devices_for_runtimes(force: true)
|
54
56
|
|
55
57
|
# Check if missing runtimes are available after installing
|
56
58
|
missing_runtimes = missing_runtimes(missing_runtimes)
|
@@ -143,7 +145,7 @@ module Fastlane
|
|
143
145
|
def cached_runtime_file(missing_runtime)
|
144
146
|
FileUtils.mkdir_p(cache_dir)
|
145
147
|
|
146
|
-
runtime_dmg_search_pattern = "#{cache_dir}/#{missing_runtime.sdk_platform}_#{missing_runtime.product_version}_"
|
148
|
+
runtime_dmg_search_pattern = "#{cache_dir}/#{missing_runtime.sdk_platform}_#{missing_runtime.product_version}*_"
|
147
149
|
|
148
150
|
# Remove the last character of the build version if it is the latest beta.
|
149
151
|
# Apple can create a new Runtime version and block product build version
|