Class: Fastlane::Actions::AddGitTagAction
- Inherits:
-
Fastlane::Action
- Object
- Fastlane::Action
- Fastlane::Actions::AddGitTagAction
- Defined in:
- lib/fastlane/actions/add_git_tag.rb
Overview
Adds a git tag to the current commit
Class Method Summary collapse
- .author ⇒ Object
- .available_options ⇒ Object
- .description ⇒ Object
- .is_supported?(platform) ⇒ Boolean
- .run(options) ⇒ Object
Methods inherited from Fastlane::Action
action_name, authors, details, output, return_value, sh, step_text
Class Method Details
.author ⇒ Object
40 41 42 |
# File 'lib/fastlane/actions/add_git_tag.rb', line 40 def self. "lmirosevic" end |
.available_options ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fastlane/actions/add_git_tag.rb', line 18 def self. [ FastlaneCore::ConfigItem.new(key: :tag, env_name: "FL_GIT_TAG_TAG", description: "Define your own tag text. This will replace all other parameters", optional: true), FastlaneCore::ConfigItem.new(key: :grouping, env_name: "FL_GIT_TAG_GROUPING", description: "Is used to keep your tags organised under one 'folder'. Defaults to 'builds'", default_value: 'builds'), FastlaneCore::ConfigItem.new(key: :prefix, env_name: "FL_GIT_TAG_PREFIX", description: "Anything you want to put in front of the version number (e.g. 'v')", default_value: ''), FastlaneCore::ConfigItem.new(key: :build_number, env_name: "FL_GIT_TAG_BUILD_NUMBER", description: "The build number. Defaults to the result of increment_build_number if you\'re using it", default_value: Actions.lane_context[Actions::SharedValues::BUILD_NUMBER], is_string: false) ] end |
.description ⇒ Object
14 15 16 |
# File 'lib/fastlane/actions/add_git_tag.rb', line 14 def self.description "This will add an annotated git tag to the current branch" end |
.is_supported?(platform) ⇒ Boolean
44 45 46 |
# File 'lib/fastlane/actions/add_git_tag.rb', line 44 def self.is_supported?(platform) true end |
.run(options) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/fastlane/actions/add_git_tag.rb', line 5 def self.run() lane_name = Actions.lane_context[Actions::SharedValues::LANE_NAME].delete(' ') # no spaces allowed tag = [:tag] || "#{[:grouping]}/#{lane_name}/#{[:prefix]}#{[:build_number]}" UI. "Adding git tag '#{tag}' 🎯." Actions.sh("git tag -am '#{tag} (fastlane)' '#{tag}'") end |