Class: Fastlane::Actions::RsyncAction

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

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, method_missing, other_action, output, return_value, sh, step_text

Class Method Details

.authorsObject



56
57
58
# File 'lib/fastlane/actions/rsync.rb', line 56

def self.authors
  ["hjanuschka"]
end

.available_optionsObject



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/fastlane/actions/rsync.rb', line 29

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :extra,
                                 short_option: "-X",
                                 env_name: "FL_RSYNC_EXTRA", # The name of the environment variable
                                 description: "Port", # a short description of this parameter
                                 optional: true,
                                 default_value: "-av",
                                 is_string: true
                                ),
    FastlaneCore::ConfigItem.new(key: :source,
                                 short_option: "-S",
                                 env_name: "FL_RSYNC_SRC", # The name of the environment variable
                                 description: "source file/folder", # a short description of this parameter
                                 optional: false,
                                 is_string: true
                                ),
    FastlaneCore::ConfigItem.new(key: :destination,
                                 short_option: "-D",
                                 env_name: "FL_RSYNC_DST", # The name of the environment variable
                                 description: "destination file/folder", # a short description of this parameter
                                 optional: false,
                                 is_string: true
                                )
  ]
end

.descriptionObject



21
22
23
# File 'lib/fastlane/actions/rsync.rb', line 21

def self.description
  "Rsync files from :source to :destination"
end

.detailsObject



25
26
27
# File 'lib/fastlane/actions/rsync.rb', line 25

def self.details
  "A wrapper around rsync, rsync is a tool that lets you synchronize files, including permissions and so on for a more detailed information about rsync please see rsync(1) manpage."
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


60
61
62
# File 'lib/fastlane/actions/rsync.rb', line 60

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/fastlane/actions/rsync.rb', line 9

def self.run(params)
  rsync_cmd = ["rsync"]
  rsync_cmd << params[:extra]
  rsync_cmd << params[:source]
  rsync_cmd << params[:destination]
  Actions.sh(rsync_cmd.join(" "))
end