class RogerSneakpeek::CI

Get relevant git info

Public Class Methods

ci?() click to toggle source

Are we running in CI?

# File lib/roger_sneakpeek/ci.rb, line 5
def self.ci?
  ENV["CI"]
end

Public Instance Methods

branch() click to toggle source

Will return current branch or tag in CI mode.

# File lib/roger_sneakpeek/ci.rb, line 19
def branch
  ENV["CI_BUILD_REF_NAME"]
end
sha() click to toggle source
# File lib/roger_sneakpeek/ci.rb, line 13
def sha
  ENV["CI_BUILD_REF"]
end
tag() click to toggle source
# File lib/roger_sneakpeek/ci.rb, line 9
def tag
  ENV["CI_BUILD_TAG"]
end