Class: Fastlane::Actions::ClearDerivedDataAction

Inherits:
Fastlane::Action show all
Defined in:
lib/fastlane/actions/clear_derived_data.rb

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, return_value, sh, step_text

Class Method Details

.authorsObject



35
36
37
# File 'lib/fastlane/actions/clear_derived_data.rb', line 35

def self.authors
  ["KrauseFx"]
end

.available_optionsObject



23
24
25
26
27
28
29
30
# File 'lib/fastlane/actions/clear_derived_data.rb', line 23

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :derived_data_path,
                                 env_name: "DERIVED_DATA_PATH",
                                 description: "Custom path for derivedData",
                                 default_value: "~/Library/Developer/Xcode/DerivedData")
  ]
end

.descriptionObject



15
16
17
# File 'lib/fastlane/actions/clear_derived_data.rb', line 15

def self.description
  "Deletes the Xcode Derived Data"
end

.detailsObject



19
20
21
# File 'lib/fastlane/actions/clear_derived_data.rb', line 19

def self.details
  "Deletes the Derived Data from '~/Library/Developer/Xcode/DerivedData' or a supplied path"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/fastlane/actions/clear_derived_data.rb', line 39

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.outputObject



32
33
# File 'lib/fastlane/actions/clear_derived_data.rb', line 32

def self.output
end

.run(options) ⇒ Object



4
5
6
7
8
9
# File 'lib/fastlane/actions/clear_derived_data.rb', line 4

def self.run(options)
  path = File.expand_path(options[:derived_data_path])
  UI.message("Derived Data path located at: #{path}")
  FileUtils.rm_rf(path) if File.directory?(path)
  UI.success("Successfully cleared Derived Data ♻️")
end