Sha256: eea09d47ce2fceaeacbb79872ee30c8a94d34f5fe941356deceb36d0f645a215

Contents?: true

Size: 888 Bytes

Versions: 57

Compression:

Stored size: 888 Bytes

Contents

module Fastlane
  module Actions
    module SharedValues
    end

    class GitBranchAction < Action
      def self.run(params)
        return ENV['GIT_BRANCH'] if ENV['GIT_BRANCH']
        return ENV["TRAVIS_BRANCH"] if ENV["TRAVIS_BRANCH"]
        `git symbolic-ref HEAD --short 2>/dev/null`.strip
      end

      #####################################################
      # @!group Documentation
      #####################################################

      def self.description
        "Returns the name of the current git branch"
      end

      def self.details
        "If no branch could be found, this action will return nil"
      end

      def self.available_options
        []
      end

      def self.output
        []
      end

      def self.authors
        ["KrauseFx"]
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
fastlane-1.90.0 lib/fastlane/actions/git_branch.rb
fastlane-1.89.0 lib/fastlane/actions/git_branch.rb
fastlane-1.88.0 lib/fastlane/actions/git_branch.rb
fastlane-1.87.1 lib/fastlane/actions/git_branch.rb
fastlane-1.87.0 lib/fastlane/actions/git_branch.rb
fastlane-1.86.1 lib/fastlane/actions/git_branch.rb
fastlane-1.86.0 lib/fastlane/actions/git_branch.rb
fastlane-1.85.0 lib/fastlane/actions/git_branch.rb
fastlane-1.84.0 lib/fastlane/actions/git_branch.rb
fastlane-1.83.0 lib/fastlane/actions/git_branch.rb
fastlane-1.82.0 lib/fastlane/actions/git_branch.rb
fastlane-1.81.0 lib/fastlane/actions/git_branch.rb
fastlane-1.80.0 lib/fastlane/actions/git_branch.rb
fastlane-1.70.0 lib/fastlane/actions/git_branch.rb
fastlane-1.69.0 lib/fastlane/actions/git_branch.rb
fastlane-1.68.0 lib/fastlane/actions/git_branch.rb
fastlane-1.67.0 lib/fastlane/actions/git_branch.rb
fastlane-1.66.0 lib/fastlane/actions/git_branch.rb
fastlane-1.65.0 lib/fastlane/actions/git_branch.rb
fastlane-1.64.0 lib/fastlane/actions/git_branch.rb