Module: Herbert::Utils

Defined in:
lib/herbert/Utils.rb

Defined Under Namespace

Modules: Helpers

Class Method Summary collapse

Class Method Details

.versionObject

Assert v<major>.<minor>.<etc> tags



12
13
14
15
16
17
18
19
20
# File 'lib/herbert/Utils.rb', line 12

def self.version
  version = `git describe --long`.strip
  if $?.success?
    version[0] = '' if version[0] == 'v'
    return version
  else
    return IO.read("#{Dir.getwd}/VERSION")
  end
end