Class: Fastlane::Actions::LastGitTagAction

Inherits:
Fastlane::Action show all
Defined in:
fastlane/lib/fastlane/actions/last_git_tag.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, lane_context, method_missing, other_action, return_value, sample_return_value, shell_out_should_use_bundle_exec?, step_text

Class Method Details

.authorsObject



33
34
35
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 33

def self.authors
  ["KrauseFx", "wedkarz"]
end

.available_optionsObject



16
17
18
19
20
21
22
23
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 16

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :pattern,
                                 description: "Pattern to filter tags when looking for last one. Limit tags to ones matching given shell glob. If pattern lacks ?, *, or [, * at the end is implied",
                                 default_value: nil,
                                 optional: true)
  ]
end

.categoryObject



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

def self.category
  :source_control
end

.descriptionObject



12
13
14
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 12

def self.description
  "Get the most recent git tag"
end

.detailsObject



41
42
43
44
45
46
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 41

def self.details
  [
    "If you are using this action on a **shallow clone**, *the default with some CI systems like Bamboo*, you need to ensure that you have also pulled all the git tags appropriately. Assuming your git repo has the correct remote set you can issue `sh('git fetch --tags')`.",
    "Pattern parameter allows you to filter to a subset of tags."
  ].join("\n")
end

.example_codeObject



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

def self.example_code
  [
    'last_git_tag',
    'last_git_tag(pattern: "release/v1.0/")'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:



37
38
39
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 37

def self.is_supported?(platform)
  true
end

.outputObject



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

def self.output
  []
end

.return_typeObject



29
30
31
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 29

def self.return_type
  :string
end

.run(params) ⇒ Object



4
5
6
# File 'fastlane/lib/fastlane/actions/last_git_tag.rb', line 4

def self.run(params)
  Actions.last_git_tag_name(true, params[:pattern])
end