Versioning is hard.

This commit is contained in:
Chris Eppstein 2010-05-12 09:17:05 -07:00
parent e26489f0c8
commit 7474dfad2f
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,6 @@
---
:patch: 0
:major: 0
:minor: 10
:minor: 11
:state: alpha
:build: 0

View File

@ -25,9 +25,10 @@ module Compass
@version = YAML::load(File.read(scope('VERSION.yml')))
@version[:teeny] = @version[:patch]
@version[:string] = "#{@version[:major]}.#{@version[:minor]}.#{@version[:patch]}"
@version[:string] << ".#{@version[:state]}" if @version[:state]
@version[:string] << ".#{@version[:build]}" if @version[:build]
if !ENV['OFFICIAL'] && r = revision
@version[:string] << ".dev.#{r[0..6]}"
@version[:string] << ".#{r[0..6]}"
end
@version
end