fastlane-plugin-stream_actions 0.3.106 → 0.3.107

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: 4ba3ab04a88ec35be174f653fdd4df0d359d579789364619a4207b2cd402f88d
4
- data.tar.gz: ec78144c8b5c0045ee4d631957e06ede308d5619313eef852814418b16f616c9
3
+ metadata.gz: 9db48bafeb0f1e7575d5aede5126b71ca0e398ebdc5a117e7b2269d24d18ee71
4
+ data.tar.gz: 9df754ab7f03bf3668290c78f35a72728454cb9704028042f2654423ba43348c
5
5
  SHA512:
6
- metadata.gz: 0a3228f1afc8e82f317a2b29115260da6ae856a0f454975bddb5e0c4caf5b3f6e37d9d927c868e340ee2614a4ecde07f78ce36c31743994f0fb05418fdcce204
7
- data.tar.gz: 64fd61089d6429da12eaafa89b771c93335dd281b8f2e6125255a988efae97fcd1fda3dc6609931eeb852f66b43c2fdd3f13836284d618a5229d1a4a97c63c4f
6
+ metadata.gz: ef6b59683cfcc6e96eb20913a489ac400894479c6d59c787302857b107ed7a5775bb4b688f7419afb8fc6d1b5f397615a8a2e0bbbb1dc98427a646c26e09a51d
7
+ data.tar.gz: 9c19bc96a35fd508c7bfbacc82a3314b8a54eb26f4068c4a572e57d601ea86df7863e03471b7208d22bb9a7c42c6e51540c3222272d4c798a42c39182701e642
@@ -3,13 +3,14 @@ module Fastlane
3
3
  class ShowDetailedSdkSizeAction < Action
4
4
  def self.run(params)
5
5
  is_release = other_action.current_branch.include?('release/')
6
+ is_push_to_base_branch = ENV['GITHUB_EVENT_NAME'].to_s == 'push' && other_action.current_branch == params[:base_branch]
6
7
  metrics_dir = 'metrics'
7
8
  FileUtils.remove_dir(metrics_dir, force: true)
8
9
  sh("git clone git@github.com:GetStream/stream-internal-metrics.git #{metrics_dir}")
9
10
 
10
11
  params[:sdk_names].each do |sdk|
11
12
  metrics_path = "metrics/linkmaps/#{sdk}.json"
12
- metrics_branch = is_release ? 'release' : 'develop'
13
+ metrics_branch = is_release ? 'release' : params[:base_branch]
13
14
  metrics = JSON.parse(File.read(metrics_path))
14
15
  old_details = metrics[metrics_branch] || {}
15
16
  new_details = other_action.xcsize(
@@ -50,7 +51,7 @@ module Fastlane
50
51
 
51
52
  next unless other_action.is_ci
52
53
 
53
- if is_release || (ENV['GITHUB_EVENT_NAME'].to_s == 'push' && other_action.current_branch == 'develop')
54
+ if is_release || is_push_to_base_branch
54
55
  Dir.chdir(metrics_dir) do
55
56
  if sh('git status -s').to_s.empty?
56
57
  UI.important('No changes in linkmap.')
@@ -112,6 +113,11 @@ module Fastlane
112
113
  optional: true,
113
114
  is_string: false,
114
115
  default_value: 1
116
+ ),
117
+ FastlaneCore::ConfigItem.new(
118
+ key: :base_branch,
119
+ description: 'Base branch name',
120
+ default_value: 'develop'
115
121
  )
116
122
  ]
117
123
  end
@@ -12,13 +12,14 @@ module Fastlane
12
12
  sdk_size_path = "#{metrics_dir}/#{params[:github_repo].split('/').last}-size.json"
13
13
  sh("git clone git@github.com:GetStream/stream-internal-metrics.git #{metrics_dir}/")
14
14
  is_release = other_action.current_branch.include?('release/')
15
+ is_push_to_base_branch = ENV['GITHUB_EVENT_NAME'].to_s == 'push' && other_action.current_branch == params[:base_branch]
15
16
  benchmark_config = JSON.parse(File.read(sdk_size_path))
16
- benchmark_key = is_release ? 'release' : 'develop'
17
- benchmark_sizes = benchmark_config[benchmark_key]
17
+ benchmark_key = is_release ? 'release' : params[:base_branch]
18
+ benchmark_sizes = benchmark_config[benchmark_key] || {}
18
19
  is_kb = params[:size_ext] == 'KB'
19
20
 
20
21
  table_header = '## SDK Size'
21
- markdown_table = "#{table_header}\n| `title` | `#{is_release ? 'previous release' : 'develop'}` | `#{is_release ? 'current release' : 'branch'}` | `diff` | `status` |\n| - | - | - | - | - |\n"
22
+ markdown_table = "#{table_header}\n| `title` | `#{is_release ? 'previous release' : params[:base_branch]}` | `#{is_release ? 'current release' : 'branch'}` | `diff` | `status` |\n| - | - | - | - | - |\n"
22
23
  params[:branch_sizes].each do |sdk_name, branch_value_kb|
23
24
  branch_value_mb = (branch_value_kb / 1024.0).round(2)
24
25
  branch_value = is_kb ? branch_value_kb.round(0) : branch_value_mb
@@ -60,7 +61,7 @@ module Fastlane
60
61
 
61
62
  return unless other_action.is_ci
62
63
 
63
- if is_release || (ENV['GITHUB_EVENT_NAME'].to_s == 'push' && other_action.current_branch == 'develop')
64
+ if is_release || is_push_to_base_branch
64
65
  benchmark_config[benchmark_key] = params[:branch_sizes]
65
66
  File.write(sdk_size_path, JSON.pretty_generate(benchmark_config))
66
67
  Dir.chdir(File.dirname(sdk_size_path)) do
@@ -119,6 +120,11 @@ module Fastlane
119
120
  description: 'Fine tolerance (in KB `if size_ext == MB` or in B `if size_ext == KB`)',
120
121
  is_string: false,
121
122
  optional: true
123
+ ),
124
+ FastlaneCore::ConfigItem.new(
125
+ key: :base_branch,
126
+ description: 'Base branch name',
127
+ default_value: 'develop'
122
128
  )
123
129
  ]
124
130
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.3.106'
3
+ VERSION = '0.3.107'
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.106
4
+ version: 0.3.107
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-16 00:00:00.000000000 Z
11
+ date: 2026-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xctest_list