Sha256: af77fb1c3fe265fbc201a7411f6282c8a23092773c9c3be1a0f67650602c9b19

Contents?: true

Size: 516 Bytes

Versions: 1

Compression:

Stored size: 516 Bytes

Contents

module OpenstudioStandards
  def self.git_revision
    cmd = 'git'
    exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
    ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
      exts.each do |ext|
        exe = "#{path}/#{cmd}#{ext}"
        if File.executable?(exe)
          revision = `"#{exe}" -C "#{__dir__}" rev-parse --short HEAD`
          return revision.strip!
        end
      end
    end
    return 'git-not-found-on-this-system'
  end
  VERSION = '0.6.0.rc2'.freeze
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openstudio-standards-0.6.0.rc2 lib/openstudio-standards/version.rb