fastlane-plugin-stream_actions 0.2.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51515d694ad7ffe607e7ac905bec535762ce45e2864182a584c13be2f5f03407
4
- data.tar.gz: '0966ff481d55fd371210ea3a91eaaa93d2b152925adf89f378dde406228a40e4'
3
+ metadata.gz: 61cac1bdd8a97e86a9b3d61aab4f150b7de21a54c2e011b19f2ceb051cdfcf95
4
+ data.tar.gz: 8b898121704fcfc80e79f798ebea18d611fa9354b307d2bcc149a315a18b4844
5
5
  SHA512:
6
- metadata.gz: 65485c117986f0a5e59e6a99b01b47a6eddcd026e00572d7128c8e4eefc05f8d2495620e161f61122e0b2d0484a247e3230a9cdef5d291ec7aa7bb972d7edadb
7
- data.tar.gz: 707a89dba5ba744b4e78cea21484094ce9ed2c776c6a47a28197867c09881d97bef4053365aaffb132ca72bfefa11d0e67d85164d5e928fe24fa6a490652469e
6
+ metadata.gz: c76d69854c1f4ea9243430b204acaea7946846879908d7324facc8f2e1ab6fba1243d85a0a430fc87abf2351ce51de3a4168f5b669e205b417fba1634b8b454d
7
+ data.tar.gz: 338b500a79c0a649dcf8f1837cc93b8f6572278f6525b1553e84bb7e43aeeca51e99d093de020b84826f6b4d98340018d8acd3e0f9385a8465dc9e6d5c7284a5
@@ -14,7 +14,7 @@ module Fastlane
14
14
  api_key: params[:api_key],
15
15
  type: type,
16
16
  app_identifier: params[:app_identifier],
17
- readonly: params[:readonly] || true,
17
+ readonly: params[:readonly],
18
18
  force_for_new_devices: !other_action.is_ci
19
19
  )
20
20
  end
@@ -5,26 +5,26 @@ module Fastlane
5
5
  simulators = FastlaneCore::Simulator.all
6
6
  version_regex = /\((\d+\.)?(\d+\.)?(\*|\d+)\)/
7
7
  ios_version = params[:device][version_regex]
8
+ device_name = params[:device].sub(version_regex, '').strip
9
+ udid = nil
8
10
 
9
11
  if ios_version.nil?
10
12
  sim = simulators.filter { |d| d.name == params[:device] }.max_by(&:os_version)
11
13
  else
12
14
  sim = simulators.detect { |d| "#{d.name} (#{d.os_version})" == params[:device] }
13
- if sim.nil?
14
- device_name = params[:device].sub(version_regex, '').strip
15
- sh("xcrun simctl create '#{device_name}' '#{device_name}' 'iOS#{ios_version.delete('()')}'")
16
- sim = simulators.detect { |d| "#{d.name} (#{d.os_version})" == params[:device] }
17
- end
15
+ udid = `xcrun simctl create '#{device_name}' '#{device_name}' 'iOS#{ios_version.delete('()')}'` if sim.nil?
18
16
  end
19
17
 
20
- if sim.nil?
18
+ udid = sim.udid unless sim.nil?
19
+
20
+ if sim.nil? && (udid.nil? || udid.empty?)
21
21
  simulators.map! { |d| "#{d.name} (#{d.os_version})" }.join("\n")
22
22
  UI.user_error!("Simulator #{params[:device]} not found \nAvailable simulators: \n#{simulators}")
23
23
  end
24
24
 
25
- sim.reset if params[:reset]
26
- sh("xcrun simctl bootstatus #{sim.udid} -b")
27
- UI.success("Simulator #{sim.name} (#{sim.os_version}) is ready")
25
+ sim.reset if sim && params[:reset]
26
+ sh("xcrun simctl bootstatus #{udid} -b")
27
+ UI.success("Simulator #{device_name} (#{ios_version}) is ready")
28
28
  end
29
29
 
30
30
  #####################################################
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-15 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler