fastlane-plugin-stream_actions 0.3.67 → 0.3.69
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fastlane/plugin/stream_actions/actions/pr_create.rb +16 -10
- data/lib/fastlane/plugin/stream_actions/actions/show_sdk_size.rb +19 -6
- data/lib/fastlane/plugin/stream_actions/actions/update_sdk_size_in_readme.rb +1 -1
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbb3267b8d16255b92319bcc134c6b2df4504f05f3ab25727f3e94f5b2010c16
|
4
|
+
data.tar.gz: 46ec7033ddcd83ee4af2387f4ed0ec8e53ba6b2afedcd189eb1819a5d5f5a98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f21984a3644a170c88350dc0c421a607bae36529d0b06070c9c5a898b515664a5849d37020244d06d218cbc166f3629e229317a52744cc13ad31dc73eb6d687a
|
7
|
+
data.tar.gz: bb1024f32e1cab981ebc9c1bf3fa74188a30247a425332a2ebbf831eef2c4dce5a7cab71332fe1ec5317623249d6a758db4a8a2b325210050aa316a6da6ce608
|
@@ -5,17 +5,23 @@ module Fastlane
|
|
5
5
|
sh("git checkout -b #{params[:head_branch]}")
|
6
6
|
sh('git restore Brewfile.lock.json || true')
|
7
7
|
sh("git add #{params[:git_add]}")
|
8
|
-
sh(
|
9
|
-
|
8
|
+
staged_files = sh('git diff --cached --name-only').split
|
9
|
+
if staged_files.empty?
|
10
|
+
unstaged_files = sh('git diff --name-only')
|
11
|
+
UI.important("There is nothing to commit. See unstaged files for more details:\n#{unstaged_files}")
|
12
|
+
else
|
13
|
+
sh("git commit -m '#{params[:title]}'")
|
14
|
+
other_action.push_to_git_remote(tags: false)
|
10
15
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
other_action.create_pull_request(
|
17
|
+
api_token: ENV.fetch('GITHUB_TOKEN'),
|
18
|
+
repo: params[:github_repo],
|
19
|
+
title: params[:title],
|
20
|
+
head: params[:head_branch],
|
21
|
+
base: params[:base_branch],
|
22
|
+
body: 'This PR was created automatically by CI.'
|
23
|
+
)
|
24
|
+
end
|
19
25
|
end
|
20
26
|
|
21
27
|
#####################################################
|
@@ -15,22 +15,23 @@ module Fastlane
|
|
15
15
|
benchmark_config = JSON.parse(File.read(sdk_size_path))
|
16
16
|
benchmark_key = is_release ? 'release' : 'develop'
|
17
17
|
benchmark_sizes = benchmark_config[benchmark_key]
|
18
|
+
is_kb = params[:size_ext] == 'KB'
|
18
19
|
|
19
20
|
table_header = '## SDK Size'
|
20
21
|
markdown_table = "#{table_header}\n| `title` | `#{is_release ? 'previous release' : 'develop'}` | `#{is_release ? 'current release' : 'branch'}` | `diff` | `status` |\n| - | - | - | - | - |\n"
|
21
22
|
params[:branch_sizes].each do |sdk_name, branch_value_kb|
|
22
23
|
branch_value_mb = (branch_value_kb / 1024.0).round(2)
|
23
|
-
branch_value =
|
24
|
+
branch_value = is_kb ? branch_value_kb.round(0) : branch_value_mb
|
24
25
|
benchmark_value_kb = benchmark_sizes[sdk_name.to_s]
|
25
26
|
benchmark_value_mb = (benchmark_value_kb / 1024.0).round(2)
|
26
|
-
benchmark_value =
|
27
|
-
max_tolerance = 500 # Max Tolerance is
|
28
|
-
fine_tolerance = 250 # Fine Tolerance is
|
27
|
+
benchmark_value = is_kb ? benchmark_value_kb : benchmark_value_mb
|
28
|
+
max_tolerance = params[:max_tolerance] || is_kb ? 500 : 5000 # By default, Max Tolerance is 500 Kilobytes or 5000 Bytes
|
29
|
+
fine_tolerance = params[:fine_tolerance] || is_kb ? 250 : 2500 # By default, Fine Tolerance is 250 Kilobytes or 2500 Bytes
|
29
30
|
|
30
31
|
diff_kb = (branch_value_kb - benchmark_value_kb).round(0)
|
31
32
|
diff_b = ((branch_value_kb - benchmark_value_kb) * 1024).round(0)
|
32
|
-
diff =
|
33
|
-
diff_ext =
|
33
|
+
diff = is_kb ? diff_b : diff_kb
|
34
|
+
diff_ext = is_kb ? 'B' : 'KB'
|
34
35
|
|
35
36
|
diff_sign = if diff.zero?
|
36
37
|
''
|
@@ -107,6 +108,18 @@ module Fastlane
|
|
107
108
|
key: :size_ext,
|
108
109
|
description: 'SDK size extension (KB or MB)',
|
109
110
|
default_value: 'MB'
|
111
|
+
),
|
112
|
+
FastlaneCore::ConfigItem.new(
|
113
|
+
key: :max_tolerance,
|
114
|
+
description: 'Max tolerance (in KB `if size_ext == MB` or in B `if size_ext == KB`)',
|
115
|
+
is_string: false,
|
116
|
+
optional: true
|
117
|
+
),
|
118
|
+
FastlaneCore::ConfigItem.new(
|
119
|
+
key: :fine_tolerance,
|
120
|
+
description: 'Fine tolerance (in KB `if size_ext == MB` or in B `if size_ext == KB`)',
|
121
|
+
is_string: false,
|
122
|
+
optional: true
|
110
123
|
)
|
111
124
|
]
|
112
125
|
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.
|
4
|
+
version: 0.3.69
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GetStream
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xctest_list
|