Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,44 +106,6 @@ end
release_version: options[:version])
end

# This lane lacks documentation because it ought to be part of the localized
# metadata download script instead!
desc "Updates the files with the localized keywords values for App Store Connect to match the 100 characters requirement"
lane :sanitize_appstore_keywords do | options |
Dir["./metadata/**"].each do |locale_dir|
keywords_path = File.join(locale_dir, 'keywords.txt')

unless File.exists?(keywords_path)
UI.message "Could not find keywords file in #{locale_dir}. Skipping."
next
end

keywords = File.read(keywords_path)
app_store_connect_keywords_length_limit = 100

if keywords.length <= app_store_connect_keywords_length_limit
UI.verbose "#{keywords_path} has less than #{app_store_connect_keywords_length_limit} characters. Not trimming."
next
end

UI.message "#{keywords_path} has more than #{app_store_connect_keywords_length_limit} characters. Trimming it..."

case File.basename(locale_dir)
when 'ar-SA'
separator = '،'
else
separator = ','
end

until keywords.length <= app_store_connect_keywords_length_limit do
keywords = keywords.split(separator)[0...-1].join(separator)
puts keywords
end

File.write(keywords_path, keywords)
end
end

#####################################################################################
# new_beta_release
# -----------------------------------------------------------------------------------
Expand Down