Class: Fastlane::Actions::BackupFileAction
Class Method Summary
collapse
action_name, authors, details, output, sh, step_text
Class Method Details
.author ⇒ Object
18
19
20
|
# File 'lib/fastlane/actions/backup_file.rb', line 18
def self.author
"gin0606"
end
|
.available_options ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/fastlane/actions/backup_file.rb', line 22
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :path,
description: "Path to the file you want to backup",
optional: false),
]
end
|
.description ⇒ Object
10
11
12
|
# File 'lib/fastlane/actions/backup_file.rb', line 10
def self.description
'This action backs up your file to "[path].back"'
end
|
.is_supported?(platform) ⇒ Boolean
14
15
16
|
# File 'lib/fastlane/actions/backup_file.rb', line 14
def self.is_supported?(platform)
true
end
|
.run(params) ⇒ Object
4
5
6
7
8
|
# File 'lib/fastlane/actions/backup_file.rb', line 4
def self.run params
path = params[:path]
FileUtils.cp(path, "#{path}.back", {preserve: true})
Helper.log.info "Successfully created a backup 💾"
end
|