Method: Stool::Command::Repo.cacheCleanAll

Defined in:
lib/stool/Command/Repo.rb

.cacheCleanAllObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/stool/Command/Repo.rb', line 23

def self.cacheCleanAll
  puts "clean all cache"
  hasClean = []
  path = @@config.repoCachePath
  Dir.entries(path).each{|file|
    if file['.'] || file.eql?('master')
      #do nothing
    else
      podCache = File.join(path,file)
      Dir.entries(podCache).sort.each{|podName|
        unless hasClean.include?(podName) || podName['.']
          puts "清理缓存#{podName} "
          puts `pod cache clean #{podName} --all`
          hasClean.push(podName)
        end
      }
    end
  }
end