Class: Fastlane::Actions::AddGitTagAction

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/actions/add_git_tag.rb

Overview

Adds a git tag to the current commit

Class Method Summary collapse

Class Method Details

.run(params) ⇒ Object



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

def self.run(params)
  params = params.first

  grouping      = (params && params[:grouping]) || 'builds'
  prefix        = (params && params[:prefix]) || ''
  build_number  = (params && params[:build_number]) || Actions.lane_context[Actions::SharedValues::BUILD_NUMBER]
  
  lane_name     = Actions.lane_context[Actions::SharedValues::LANE_NAME]

  Actions.sh("git tag #{grouping}/#{lane_name}/#{prefix}#{build_number}")

  Helper.log.info 'Added git tag 🎯.'
end