class Fastlane::Actions::GitPullAction
Public Class Methods
available_options()
click to toggle source
# File fastlane/lib/fastlane/actions/git_pull.rb, line 22 def self.available_options [ FastlaneCore::ConfigItem.new(key: :only_tags, description: "Simply pull the tags, and not bring new commits to the current branch from the remote", type: Boolean, optional: true, default_value: false), FastlaneCore::ConfigItem.new(key: :rebase, description: "Rebase on top of the remote branch instead of merge", type: Boolean, optional: true, default_value: false) ] end
category()
click to toggle source
# File fastlane/lib/fastlane/actions/git_pull.rb, line 53 def self.category :source_control end
description()
click to toggle source
# File fastlane/lib/fastlane/actions/git_pull.rb, line 18 def self.description "Executes a simple git pull command" end
example_code()
click to toggle source
# File fastlane/lib/fastlane/actions/git_pull.rb, line 45 def self.example_code [ 'git_pull', 'git_pull(only_tags: true) # only the tags, no commits', 'git_pull(rebase: true) # use --rebase with pull' ] end
is_supported?(platform)
click to toggle source
# File fastlane/lib/fastlane/actions/git_pull.rb, line 41 def self.is_supported?(platform) true end
run(params)
click to toggle source
# File fastlane/lib/fastlane/actions/git_pull.rb, line 4 def self.run(params) commands = [] unless params[:only_tags] command = "git pull" command << " --rebase" if params[:rebase] commands += ["#{command} &&"] end commands += ["git fetch --tags"] Actions.sh(commands.join(' ')) end