Class: Fastlane::Actions::PushGitTagsAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/push_git_tags.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, authors, deprecated_notes, 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

.authorObject



48
49
50
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 48

def self.author
  ['vittoriom']
end

.available_optionsObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 28

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :force,
                                 env_name: "FL_PUSH_GIT_FORCE",
                                 description: "Force push to remote",
                                 is_string: false,
                                 default_value: false,
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :remote,
                                 env_name: "FL_GIT_PUSH_REMOTE",
                                 description: "The remote to push tags to",
                                 default_value: "origin",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :tag,
                                 env_name: "FL_GIT_PUSH_TAG",
                                 description: "The tag to push to remote",
                                 optional: true)
  ]
end

.categoryObject



66
67
68
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 66

def self.category
  :source_control
end

.descriptionObject



24
25
26
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 24

def self.description
  "Push local tags to the remote - this will only push tags"
end

.detailsObject



52
53
54
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 52

def self.details
  "If you only want to push the tags and nothing else, you can use the `push_git_tags` action"
end

.example_codeObject



60
61
62
63
64
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 60

def self.example_code
  [
    'push_git_tags'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



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

def self.is_supported?(platform)
  true
end

.run(params) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'fastlane/lib/fastlane/actions/push_git_tags.rb', line 4

def self.run(params)
  command = [
    'git',
    'push',
    params[:remote],
    params[:tag] || '--tags'
  ]

  # optionally add the force component
  command << '--force' if params[:force]

  result = Actions.sh(command.join(' '))
  UI.success('Tags pushed to remote')
  result
end