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'))
|
||||
rev = File.read(scope('REVISION')).strip
|
||||
rev = nil if rev !~ /[a-f0-9]+/
|
||||
rev = nil if rev !~ /^([a-f0-9]+|\(.*\))$/
|
||||
end
|
||||
|
||||
if rev.nil? && File.exists?(scope('.git/HEAD'))
|
||||
|
@ -1005,8 +1005,10 @@ module Haml
|
|||
|
||||
if rev
|
||||
@@version[:rev] = rev
|
||||
@@version[:string] << "."
|
||||
@@version[:string] << rev[0...7] unless rev[0] == ?(
|
||||
unless rev[0] == ?(
|
||||
@@version[:string] << "."
|
||||
@@version[:string] << rev[0...7]
|
||||
end
|
||||
end
|
||||
|
||||
@@version
|
||||
|
|
Loading…
Add table
Reference in a new issue