A more robust approach to getting the git version.
This commit is contained in:
parent
7d90dfe4a0
commit
8527f5b91f
@ -40,12 +40,12 @@ module Compass
|
|||||||
|
|
||||||
def revision_from_git
|
def revision_from_git
|
||||||
if File.exists?(scope('.git/HEAD'))
|
if File.exists?(scope('.git/HEAD'))
|
||||||
rev = File.read(scope('.git/HEAD')).strip
|
Dir.chdir scope(".") do
|
||||||
if rev =~ /^ref: (.*)$/
|
`git rev-parse HEAD`
|
||||||
rev = File.read(scope(".git/#{$1}")).strip
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
extend Compass::Version
|
extend Compass::Version
|
||||||
def self.const_missing(const)
|
def self.const_missing(const)
|
||||||
|
Loading…
Reference in New Issue
Block a user