Skip to content
Snippets Groups Projects
Commit 0c30f544 authored by Alec Leamas's avatar Alec Leamas
Browse files

Fallback to static version data if git unavailable.

Uses the file config/gitversion if git is unavailable.  This is to
support deployment without git (which will be necessary). Installation
script will generate the file config/gitversion when app is shipped.
parent 4d58a396
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,22 @@
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
GIT_INFO = `git show --name-only`
s = `git show --name-only 2>/dev/null || :`
if (s.nil? or s.empty?)
path = File.expand_path("config/gitversion")
begin
if (File.exists?( path))
s = ''
f = File.open( path)
f.each_line do |line|
s += line
end
f.close
end
rescue
s = ""
end
end
GIT_INFO = s
# What's the scope of this s? Leave to GC just in case...
s = nil
......@@ -65,9 +65,6 @@ The topmost comment's version is patched to reflect the complete version
of current specfile by 'make-dist source'. WRite the comment in this
directory, copy-paste previous version nr. It will be updated.
rpmlint shows many errors, most of which related to that the server
won't start if the .git directories are not included. Needs investigation.
This has been confirmed to start up and provide basic functionality both using
the thin webserver and apache passenger, and on 32/64 bit systems.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment