class Fastlane::Actions::CleanCocoapodsCacheAction

Public Class Methods

authors() click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 32
def self.authors
  ["alexmx"]
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 19
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :name,
                                 env_name: "FL_CLEAN_COCOAPODS_CACHE_DEVELOPMENT",
                                 description: "Pod name to be removed from cache",
                                 optional: true,
                                 is_string: true,
                                 verify_block: proc do |value|
                                   UI.user_error!("You must specify pod name which should be removed from cache") if value.to_s.empty?
                                 end)
  ]
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 47
def self.category
  :building
end
description() click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 15
def self.description
  'Remove the cache for pods'
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 40
def self.example_code
  [
    'clean_cocoapods_cache',
    'clean_cocoapods_cache(name: "CACHED_POD")'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 36
def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/clean_cocoapods_cache.rb, line 4
def self.run(params)
  Actions.verify_gem!('cocoapods')

  cmd = ['pod cache clean']

  cmd << params[:name].to_s if params[:name]
  cmd << '--all'

  Actions.sh(cmd.join(' '))
end