can't access git on heroku

This commit is contained in:
danielgrippi 2011-08-30 21:51:33 -07:00
parent b3534ed5f4
commit 3f84dd066f

View file

@ -2,22 +2,26 @@
# licensed under the Affero General Public License version 3 or later. See # licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file. # the COPYRIGHT file.
s = `git show --name-only 2>/dev/null || :` unless ENV['HEROKU']
if (s.nil? or s.empty?) s = `git show --name-only 2>/dev/null || :`
path = File.expand_path("config/gitversion") if (s.nil? or s.empty?)
begin path = File.expand_path("config/gitversion")
if (File.exists?( path)) begin
s = '' if (File.exists?( path))
f = File.open( path) s = ''
f.each_line do |line| f = File.open( path)
s += line f.each_line do |line|
end s += line
f.close end
end f.close
rescue end
s = "" rescue
end s = ""
end
end
GIT_INFO = s
# What's the scope of this s? Leave to GC just in case...
s = nil
else
GIT_INFO = nil
end end
GIT_INFO = s
# What's the scope of this s? Leave to GC just in case...
s = nil