Skip to content

Commit

Permalink
Update sdk size diff sign
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple committed Aug 12, 2024
1 parent c0b9492 commit eb88f16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
28 changes: 17 additions & 11 deletions lib/fastlane/plugin/stream_actions/actions/show_sdk_size.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,24 @@ def self.run(params)
fine_tolerance = 250 # Fine Tolerance is 250KB

diff = branch_value_kb - benchmark_value_kb
diff_sign = diff.positive? ? '+' : '-'

status_emoji =
if diff < 0
outstanding_status
elsif diff >= max_tolerance
fail_status
elsif diff >= fine_tolerance
warning_status
else
success_status
end
diff_sign = if diff.zero?
''
elsif diff.positive?
'+'
else
'-'
end

status_emoji = if diff < 0
outstanding_status
elsif diff >= max_tolerance
fail_status
elsif diff >= fine_tolerance
warning_status
else
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"
end
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.52'
VERSION = '0.3.53'
end
end

0 comments on commit eb88f16

Please sign in to comment.