mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Fix REVISION-handling a bit more.
This commit is contained in:
parent
dd0d69be77
commit
452b2c2584
1 changed files with 5 additions and 3 deletions
|
@ -993,7 +993,7 @@ module Haml
|
||||||
|
|
||||||
if File.exists?(scope('REVISION'))
|
if File.exists?(scope('REVISION'))
|
||||||
rev = File.read(scope('REVISION')).strip
|
rev = File.read(scope('REVISION')).strip
|
||||||
rev = nil if rev !~ /[a-f0-9]+/
|
rev = nil if rev !~ /^([a-f0-9]+|\(.*\))$/
|
||||||
end
|
end
|
||||||
|
|
||||||
if rev.nil? && File.exists?(scope('.git/HEAD'))
|
if rev.nil? && File.exists?(scope('.git/HEAD'))
|
||||||
|
@ -1005,8 +1005,10 @@ module Haml
|
||||||
|
|
||||||
if rev
|
if rev
|
||||||
@@version[:rev] = rev
|
@@version[:rev] = rev
|
||||||
@@version[:string] << "."
|
unless rev[0] == ?(
|
||||||
@@version[:string] << rev[0...7] unless rev[0] == ?(
|
@@version[:string] << "."
|
||||||
|
@@version[:string] << rev[0...7]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@version
|
@@version
|
||||||
|
|
Loading…
Add table
Reference in a new issue