Class: Fastlane::Actions::EnsureTagNotExistsAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::EnsureTagNotExistsAction
- Defined in:
- lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb
Class Method Summary collapse
- .authors ⇒ Object
- .available_options ⇒ Object
- .category ⇒ Object
- .description ⇒ Object
- .example_code ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(params) ⇒ Object
Class Method Details
.authors ⇒ Object
62 63 64 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 62 def self. ["Artur Stępniewski"] end |
.available_options ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 26 def self. [ FastlaneCore::ConfigItem.new(key: :tag, env_name: "FL_ENSURE_TAG_NOT_EXISTS_TAG", description: "The tag name that should be checked", optional: false, type: String), FastlaneCore::ConfigItem.new(key: :remote, env_name: "FL_ENSURE_TAG_NOT_EXISTS_TAG_REMOTE", description: "Whether to check remote. Defaults to true", optional: true, default_value: false, type: Boolean), FastlaneCore::ConfigItem.new(key: :remote_name, env_name: "FL_ENSURE_TAG_NOT_EXISTS_TAG_REMOTE_NAME", description: "Whether to check remote. Defaults to true", optional: true, default_value: "origin", type: String) ] end |
.category ⇒ Object
54 55 56 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 54 def self.category :source_control end |
.description ⇒ Object
22 23 24 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 22 def self.description "Checks if the git tag with the given name not exists in the current repo" end |
.example_code ⇒ Object
48 49 50 51 52 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 48 def self.example_code [ 'ensure_tag_not_exist(tag: "3.2.2", remote: true)' ] end |
.is_supported?(platform) ⇒ Boolean
58 59 60 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 58 def self.is_supported?(platform) true end |
.run(params) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/fastlane/plugin/menigit/actions/ensure_tag_not_exists.rb', line 6 def self.run(params) tag = params[:tag] remote = params[:remote] remote_name = params[:remote_name] if other_action.git_tag_exists(tag: tag, remote: remote, remote_name: remote_name) = "Tag #{tag} already exists" if remote += " in #{remote_name}" end += "!" UI.user_error!() else UI.success("Success! Tag #{tag} not exists!") end end |