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

Version Path
fastlane-1.44.0 lib/fastlane/helper/git_helper.rb
fastlane-1.43.0 lib/fastlane/helper/git_helper.rb
fastlane-1.42.0 lib/fastlane/helper/git_helper.rb
fastlane-1.41.1 lib/fastlane/helper/git_helper.rb
fastlane-1.41.0 lib/fastlane/helper/git_helper.rb
fastlane-1.40.0 lib/fastlane/helper/git_helper.rb
fastlane-1.39.0 lib/fastlane/helper/git_helper.rb
fastlane-1.38.1 lib/fastlane/helper/git_helper.rb
fastlane-1.38.0 lib/fastlane/helper/git_helper.rb
fastlane-1.37.0 lib/fastlane/helper/git_helper.rb
fastlane-1.36.4 lib/fastlane/helper/git_helper.rb
fastlane-1.36.3 lib/fastlane/helper/git_helper.rb
fastlane-1.36.2 lib/fastlane/helper/git_helper.rb
fastlane-1.36.1 lib/fastlane/helper/git_helper.rb
fastlane-1.36.0 lib/fastlane/helper/git_helper.rb
fastlane-1.35.0 lib/fastlane/helper/git_helper.rb
fastlane-1.34.0 lib/fastlane/helper/git_helper.rb
fastlane-1.33.6 lib/fastlane/helper/git_helper.rb
fastlane-1.33.5 lib/fastlane/helper/git_helper.rb
fastlane-1.33.4 lib/fastlane/helper/git_helper.rb