fastlane-plugin-stream_actions 0.3.65 → 0.3.67

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c2cd3f5195d4a214e2e0eb4b8f06d557f0600cd75102367183085ad0d9f82b6d
4
- data.tar.gz: 72b6353c9a35f4a41c37690f5f163b91b7e2f34603a77ae85bc44e7e80d8a682
3
+ metadata.gz: 195738840bfa8ef93bd7341f13117f152343806ce2d2f522c978b4ec89131c5a
4
+ data.tar.gz: f82a547e295676312c91b5b9606be98900ed715eb5eee467323cb6dc46295e9c
5
5
  SHA512:
6
- metadata.gz: 7ca8f66dd604ad84a95d5c605135486cd3713c41dc110d720344c933d740ae417728cce1aee554e89d10f5cd29ed195731da69fc30ab617761da39396fb9ee59
7
- data.tar.gz: ead7aa7a621d005b8226a2844167a883e92399c649d443c51a80ea5944294be4686c964dfcee5f36b87074b4a6720efb2c3f693e83266cc2ddf06a78048723e8
6
+ metadata.gz: 491259c4dede5907a6b31e4db56a053aaa3b0746d4b95fb4fe35fa71250b240cbd217896e11b35fafa585c4128ea55fea1ece5aa49838e515bb4e0a85db3d573
7
+ data.tar.gz: aa1b545707330ae0a59fef04e006126b0a3dfe8d198aa77236ea92757ad4eac395c1a9ccc25af9fd17bc0446377b147a8931adc65d5ad659fae7cc0fb5b5e4ab
@@ -9,8 +9,12 @@ module Fastlane
9
9
  end
10
10
 
11
11
  if simulators.empty?
12
- sh("echo 'iOS #{params[:version]} Simulator' | ipsw download xcode --sim") if Dir['*.dmg'].first.nil?
13
- sh("#{params[:custom_script]} #{Dir['*.dmg'].first}")
12
+ if params[:tool] == 'ipsw'
13
+ sh("echo 'iOS #{params[:version]} Simulator' | ipsw download xcode --sim") if Dir['*.dmg'].first.nil?
14
+ sh("#{params[:custom_script]} #{Dir['*.dmg'].first}") if params[:custom_script]
15
+ else
16
+ sh("sudo xcodes runtimes install 'iOS #{params[:version]}'")
17
+ end
14
18
  UI.success("iOS #{params[:version]} Runtime successfuly installed")
15
19
  else
16
20
  UI.important("iOS #{params[:version]} Runtime already exists")
@@ -31,9 +35,18 @@ module Fastlane
31
35
  key: :version,
32
36
  description: 'iOS Version'
33
37
  ),
38
+ FastlaneCore::ConfigItem.new(
39
+ key: :tool,
40
+ description: 'Which tool to use to install the runtime: ipsw or xcodes',
41
+ default_value: 'ipsw',
42
+ verify_block: proc do |tool|
43
+ UI.user_error!('Available options are `ipsw` and `xcodes`') unless ['xcodes', 'ipsw'].include?(tool)
44
+ end
45
+ ),
34
46
  FastlaneCore::ConfigItem.new(
35
47
  key: :custom_script,
36
- description: 'Path to custom script to install the runtime'
48
+ description: 'Path to custom script to install the runtime (might be required for ipsw)',
49
+ optional: true
37
50
  )
38
51
  ]
39
52
  end
@@ -4,7 +4,7 @@ module Fastlane
4
4
  def self.run(params)
5
5
  sh("git checkout -b #{params[:head_branch]}")
6
6
  sh('git restore Brewfile.lock.json || true')
7
- sh('git add -A')
7
+ sh("git add #{params[:git_add]}")
8
8
  sh("git commit -m '#{params[:title]}'")
9
9
  other_action.push_to_git_remote(tags: false)
10
10
 
@@ -53,6 +53,12 @@ module Fastlane
53
53
  description: 'Title',
54
54
  is_string: true,
55
55
  optional: false
56
+ ),
57
+ FastlaneCore::ConfigItem.new(
58
+ key: :git_add,
59
+ description: 'Path that should be commited',
60
+ is_string: true,
61
+ default_value: '-A'
56
62
  )
57
63
  ]
58
64
  end
@@ -7,14 +7,20 @@ module Fastlane
7
7
  params[:sizes].each do |key, value|
8
8
  framework_size_kb = value
9
9
  framework_size_mb = (framework_size_kb / 1024.0).round(2)
10
- framework_size = params[:size_ext] == 'KB' ? framework_size_kb : framework_size_mb
10
+ framework_size = params[:size_ext] == 'KB' ? framework_size_kb.round(0) : framework_size_mb
11
11
  readme_content.gsub!(%r{(https://img.shields.io/badge/#{key}-)(.*?)(-blue)}, "\\1#{framework_size}%20#{params[:size_ext]}\\3")
12
12
  end
13
13
 
14
14
  File.write(params[:readme_path], readme_content)
15
15
  UI.success('Successfully updated the SDK size labels in README.md!')
16
16
 
17
- other_action.pr_create(title: '[CI] Update SDK Size', head_branch: "ci/sdk-size-update-#{Time.now.to_i}") if params[:open_pr]
17
+ if params[:open_pr]
18
+ other_action.pr_create(
19
+ title: params[:pr_title],
20
+ git_add: 'README.md',
21
+ head_branch: "ci/sdk-size-update-#{Time.now.to_i}"
22
+ )
23
+ end
18
24
  end
19
25
 
20
26
  #####################################################
@@ -39,15 +45,21 @@ module Fastlane
39
45
  description: 'SDK sizes',
40
46
  is_string: false
41
47
  ),
48
+ FastlaneCore::ConfigItem.new(
49
+ key: :size_ext,
50
+ description: 'SDK size extension (KB or MB)',
51
+ default_value: 'MB'
52
+ ),
42
53
  FastlaneCore::ConfigItem.new(
43
54
  key: :open_pr,
44
55
  description: 'Should a PR be opened',
56
+ optional: true,
45
57
  is_string: false
46
58
  ),
47
59
  FastlaneCore::ConfigItem.new(
48
- key: :size_ext,
49
- description: 'SDK size extension (KB or MB)',
50
- default_value: 'MB'
60
+ key: :pr_title,
61
+ description: 'PR title',
62
+ default_value: '[CI] Update SDK Size'
51
63
  )
52
64
  ]
53
65
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.65'
3
+ VERSION = '0.3.67'
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.3.65
4
+ version: 0.3.67
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-19 00:00:00.000000000 Z
11
+ date: 2024-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xctest_list