class CocoapodsWxpodhook::Helper
Public Instance Methods
AutoUpdateRepo()
click to toggle source
自动更新repo(官方Repo和阿里云repo不再自动更新list中)
# File lib/cocoapods-wxpodhook/helper.rb, line 14 def AutoUpdateRepo before = Time.new(); put_redMsg("开始自动更新网校自有的repo仓库") cocoapods_repo_path = File.join(ENV["HOME"], ".cocoapods/repos") # 拿到待更新的repo名称 repo_names = Dir.children(cocoapods_repo_path) repo_names.each do |repo_name| if repo_name.include?("100tal-") || repo_name.include?("TAL") puts repo_name `pod repo update #{repo_name}` end end after = Time.new(); time = after.to_i - before.to_i put_redMsg("更新Repo仓库完成,耗时#{time} 秒") end