Class: Fastlane::Actions::GitSubmoduleUpdateAction

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

Constant Summary

Constants inherited from Fastlane::Action

Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES

Documentation collapse

Class Method Summary collapse

Methods inherited from Fastlane::Action

action_name, author, deprecated_notes, details, lane_context, method_missing, other_action, return_type, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorsObject



38
39
40
# File 'fastlane/lib/fastlane/actions/git_submodule_update.rb', line 38

def self.authors
  ["braunico"]
end

.available_optionsObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'fastlane/lib/fastlane/actions/git_submodule_update.rb', line 19

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :recursive,
                                 description: "Should the submodules be updated recursively?",
                                 type: Boolean,
                                 default_value: false),
    FastlaneCore::ConfigItem.new(key: :init,
                                 description: "Should the submodules be initiated before update?",
                                 type: Boolean,
                                 default_value: false)
  ]
end

.categoryObject



55
56
57
# File 'fastlane/lib/fastlane/actions/git_submodule_update.rb', line 55

def self.category
  :source_control
end

.descriptionObject



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

def self.description
  "Executes a git submodule update command"
end

.example_codeObject



46
47
48
49
50
51
52
53
# File 'fastlane/lib/fastlane/actions/git_submodule_update.rb', line 46

def self.example_code
  [
    'git_submodule_update',
    'git_submodule_update(recursive: true)',
    'git_submodule_update(init: true)',
    'git_submodule_update(recursive: true, init: true)'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



42
43
44
# File 'fastlane/lib/fastlane/actions/git_submodule_update.rb', line 42

def self.is_supported?(platform)
  return true
end

.outputObject



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

def self.output
end

.return_valueObject



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

def self.return_value
end

.run(params) ⇒ Object



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

def self.run(params)
  commands = ["git submodule update"]
  commands += ["--init"] if params[:init]
  commands += ["--recursive"] if params[:recursive]
  Actions.sh(commands.join(' '))
end