Class: Fastlane::Actions::CleanBuildArtifactsAction
Class Method Summary
collapse
action_name, details, output, sh
Class Method Details
.author ⇒ Object
37
38
39
|
# File 'lib/fastlane/actions/clean_build_artifacts.rb', line 37
def self.author
"lmirosevic"
end
|
.available_options ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/fastlane/actions/clean_build_artifacts.rb', line 23
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :exclude_pattern,
env_name: "FL_CLEAN_BUILD_ARTIFACTS_EXCLUDE_PATTERN",
description: "Exclude all files from clearing that match the given pattern: e.g. '.*\.mobileprovision'",
default_value: nil,
optional: true)
]
end
|
.description ⇒ Object
33
34
35
|
# File 'lib/fastlane/actions/clean_build_artifacts.rb', line 33
def self.description
"Deletes files created as result of running ipa or sigh"
end
|
.is_supported?(platform) ⇒ Boolean
41
42
43
|
# File 'lib/fastlane/actions/clean_build_artifacts.rb', line 41
def self.is_supported?(platform)
[:ios, :mac].include?platform
end
|
.run(options) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/fastlane/actions/clean_build_artifacts.rb', line 4
def self.run(options)
[
Actions.lane_context[Actions::SharedValues::IPA_OUTPUT_PATH],
Actions.lane_context[Actions::SharedValues::SIGH_PROFILE_PATH],
Actions.lane_context[Actions::SharedValues::DSYM_OUTPUT_PATH],
].reject { |file| file.nil? || !File.exist?(file) }.each do |file|
if options[:exclude_pattern]
next if file.match(options[:exclude_pattern])
end
Helper.log.debug "Cleaning up '#{file}'".yellow
File.delete(file)
end
Helper.log.info 'Cleaned up build artifacts 🐙'.green
end
|