Sha256: 7b9b5442d39ff720ac7e8975442b09af79f1e62fcf2a1da9d61a51bcc741875c

Contents?: true

Size: 249 Bytes

Versions: 67

Compression:

Stored size: 249 Bytes

Contents

require 'grit'

module Dockly::Util::Git
  extend self

  def git_repo
    @git_repo ||= Grit::Repo.new('.')
  end

  def git_sha
    @git_sha ||= git_repo.git.show.lines.first.chomp.match(/^commit ([a-f0-9]+)$/)[1][0..6] rescue 'unknown'
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
dockly-2.7.2 lib/dockly/util/git.rb
dockly-2.7.1 lib/dockly/util/git.rb
dockly-2.7.0 lib/dockly/util/git.rb
dockly-1.13.0 lib/dockly/util/git.rb
dockly-2.6.0 lib/dockly/util/git.rb
dockly-1.12.3 lib/dockly/util/git.rb
dockly-2.5.3 lib/dockly/util/git.rb
dockly-1.12.2 lib/dockly/util/git.rb
dockly-2.5.2 lib/dockly/util/git.rb
dockly-1.12.1 lib/dockly/util/git.rb
dockly-2.5.1 lib/dockly/util/git.rb
dockly-1.12.0 lib/dockly/util/git.rb
dockly-2.5.0 lib/dockly/util/git.rb
dockly-1.11.0 lib/dockly/util/git.rb
dockly-2.4.0 lib/dockly/util/git.rb
dockly-2.3.0 lib/dockly/util/git.rb
dockly-1.10.0 lib/dockly/util/git.rb
dockly-1.9.0 lib/dockly/util/git.rb
dockly-1.8.0 lib/dockly/util/git.rb
dockly-2.2.0 lib/dockly/util/git.rb