Class: Fastlane::Actions::GitTagExistsAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES
Class Method Summary
collapse
action_name, author, lane_context, method_missing, other_action, sample_return_value, sh, step_text
Class Method Details
.authors ⇒ Object
37
38
39
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 37
def self.authors
["antondomashnev"]
end
|
.available_options ⇒ Object
21
22
23
24
25
26
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 21
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :tag,
description: "The tag name that should be checked")
]
end
|
.category ⇒ Object
53
54
55
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 53
def self.category
:source_control
end
|
.description ⇒ Object
13
14
15
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 13
def self.description
"Checks if the git tag with the given name exists in the current repo"
end
|
.details ⇒ Object
17
18
19
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 17
def self.details
nil
end
|
.example_code ⇒ Object
45
46
47
48
49
50
51
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 45
def self.example_code
[
'if git_tag_exists(tag: "1.1.0")
UI.message("Found it 🚀")
end'
]
end
|
.is_supported?(platform) ⇒ Boolean
41
42
43
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 41
def self.is_supported?(platform)
true
end
|
.output ⇒ Object
32
33
34
35
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 32
def self.output
[
]
end
|
.return_value ⇒ Object
28
29
30
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 28
def self.return_value
"Boolean value whether the tag exists or not"
end
|
.run(params) ⇒ Object
4
5
6
7
|
# File 'lib/fastlane/actions/git_tag_exists.rb', line 4
def self.run(params)
result = Actions.sh("git rev-parse -q --verify refs/tags/#{params[:tag].shellescape} || true", log: $verbose).chomp
!result.empty?
end
|