Class: Fastlane::Actions::BackupFileAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, authors, deprecated_notes, details, lane_context, method_missing, other_action, output, return_type, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.author ⇒ Object
18
19
20
|
# File 'fastlane/lib/fastlane/actions/backup_file.rb', line 18
def self.author
"gin0606"
end
|
.available_options ⇒ Object
22
23
24
25
26
27
28
|
# File 'fastlane/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
|
.category ⇒ Object
36
37
38
|
# File 'fastlane/lib/fastlane/actions/backup_file.rb', line 36
def self.category
:misc
end
|
.description ⇒ Object
10
11
12
|
# File 'fastlane/lib/fastlane/actions/backup_file.rb', line 10
def self.description
'This action backs up your file to "[path].back"'
end
|
.example_code ⇒ Object
30
31
32
33
34
|
# File 'fastlane/lib/fastlane/actions/backup_file.rb', line 30
def self.example_code
[
'backup_file(path: "/path/to/file")'
]
end
|
.is_supported?(platform) ⇒ Boolean
14
15
16
|
# File 'fastlane/lib/fastlane/actions/backup_file.rb', line 14
def self.is_supported?(platform)
true
end
|
.run(params) ⇒ Object
4
5
6
7
8
|
# File 'fastlane/lib/fastlane/actions/backup_file.rb', line 4
def self.run(params)
path = params[:path]
FileUtils.cp(path, "#{path}.back", { preserve: true })
UI.message("Successfully created a backup 💾")
end
|