Sha256: c3aa45cf817c2def3f03342982b990ecbea764ee0c94681c2c13d57d71d07ac7
Contents?: true
Size: 734 Bytes
Versions: 45
Compression:
Stored size: 734 Bytes
Contents
module Fastlane module Actions # Get the author name of the last git commit def self.git_author s = `git log --name-status HEAD^..HEAD` s = s.match(/Author:.*<(.*)>/)[1] return s if s.to_s.length > 0 return nil rescue return nil end def self.last_git_commit s = `git log -1 --pretty=%B`.strip return s if s.to_s.length > 0 nil end # Returns the current git branch - can be replaced using the environment variable `GIT_BRANCH` def self.git_branch return ENV['GIT_BRANCH'] if ENV['GIT_BRANCH'].to_s.length > 0 # set by Jenkins s = `git rev-parse --abbrev-ref HEAD` return s.to_s.strip if s.to_s.length > 0 nil end end end
Version data entries
45 entries across 45 versions & 1 rubygems