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.104.0 lib/fastlane/actions/git_branch.rb
fastlane-1.103.0 lib/fastlane/actions/git_branch.rb
fastlane-1.102.0 lib/fastlane/actions/git_branch.rb
fastlane-1.101.0 lib/fastlane/actions/git_branch.rb
fastlane-1.100.0 lib/fastlane/actions/git_branch.rb
fastlane-1.99.0 lib/fastlane/actions/git_branch.rb
fastlane-1.98.0 lib/fastlane/actions/git_branch.rb
fastlane-1.97.2 lib/fastlane/actions/git_branch.rb
fastlane-1.97.1 lib/fastlane/actions/git_branch.rb
fastlane-1.97.0 lib/fastlane/actions/git_branch.rb
fastlane-1.96.0 lib/fastlane/actions/git_branch.rb
fastlane-1.95.0 lib/fastlane/actions/git_branch.rb
fastlane-1.94.1 lib/fastlane/actions/git_branch.rb
fastlane-1.94.0 lib/fastlane/actions/git_branch.rb
fastlane-1.93.1 lib/fastlane/actions/git_branch.rb
fastlane-1.93.0 lib/fastlane/actions/git_branch.rb
fastlane-1.92.0 lib/fastlane/actions/git_branch.rb
fastlane-1.92.0.beta2 lib/fastlane/actions/git_branch.rb
fastlane-1.92.0.beta1 lib/fastlane/actions/git_branch.rb
fastlane-1.91.0 lib/fastlane/actions/git_branch.rb