Merge pull request #196 from TouchInstinct/feature/app_badge_number

Include numbers in build badge
This commit is contained in:
Vitaliy Salnikov 2020-06-05 14:27:08 +03:00 committed by GitHub
commit e471637325
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -87,7 +87,10 @@ end
private_lane :addShield do |options|
buildNumber = options[:buildNumber]
buildDescription = options[:xcconfig_name].scan(/\p{Upper}/)[1..2].join
buildDescription = options[:xcconfig_name] # EnterpriseCustomerDev1WithoutSSLPinningRelease
.split(/(?=[A-Z])/) # -> ["Enterprise", "Customer", "Dev1", "Without", "S", "S", "L", "Pinning", "Release"]
.map { |v| v.gsub(/[[:lower:]]+/, "") }[1..2] # -> ["E", "C", "D1", "W", "S", "S", "L", "P", "R"] -> ["C", "D1"]
.join # -> "CD1"
begin
add_badge(