can't access git on heroku
This commit is contained in:
parent
b3534ed5f4
commit
3f84dd066f
1 changed files with 22 additions and 18 deletions
|
|
@ -2,8 +2,9 @@
|
||||||
# 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 || :`
|
||||||
|
if (s.nil? or s.empty?)
|
||||||
path = File.expand_path("config/gitversion")
|
path = File.expand_path("config/gitversion")
|
||||||
begin
|
begin
|
||||||
if (File.exists?( path))
|
if (File.exists?( path))
|
||||||
|
|
@ -17,7 +18,10 @@ if (s.nil? or s.empty?)
|
||||||
rescue
|
rescue
|
||||||
s = ""
|
s = ""
|
||||||
end
|
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
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue