Skip to content

Commit

Permalink
Add space to SDK size (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple authored Aug 14, 2024
1 parent cb82b5c commit 4d1ed39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/fastlane/plugin/stream_actions/actions/show_sdk_size.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def self.run(params)
max_tolerance = 500 # Max Tolerance is 500KB
fine_tolerance = 250 # Fine Tolerance is 250KB

diff = branch_value_kb - benchmark_value_kb
diff = (branch_value_kb - benchmark_value_kb).to_i

diff_sign = if diff.zero?
''
Expand All @@ -45,7 +45,7 @@ def self.run(params)
success_status
end

markdown_table << "|#{sdk_name}|#{benchmark_value_mb}MB|#{branch_value_mb}MB|#{diff_sign}#{diff.to_i.abs}KB|#{status_emoji}|\n"
markdown_table << "|#{sdk_name}|#{benchmark_value_mb} MB|#{branch_value_mb} MB|#{diff_sign}#{diff.abs} KB|#{status_emoji}|\n"
end

FastlaneCore::PrintTable.print_values(title: 'Benchmark', config: benchmark_sizes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def self.run(params)
params[:sizes].each do |key, value|
framework_size_kb = value
framework_size_mb = (framework_size_kb / 1024.0).round(2)
readme_content.gsub!(%r{(https://img.shields.io/badge/#{key}-)(.*?)(-blue)}, "\\1#{framework_size_mb}MB\\3")
readme_content.gsub!(%r{(https://img.shields.io/badge/#{key}-)(.*?)(-blue)}, "\\1#{framework_size_mb}%20MB\\3")
end

File.write(params[:readme_path], readme_content)
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/stream_actions/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module StreamActions
VERSION = '0.3.57'
VERSION = '0.3.58'
end
end

0 comments on commit 4d1ed39

Please sign in to comment.