Add VERSION file where the sciNote Core version is stored

This commit is contained in:
Luka Murn 2017-07-10 09:26:35 +02:00
parent 53a1dd14b7
commit 16e672b9d8
5 changed files with 6 additions and 5 deletions

1
VERSION Normal file
View file

@ -0,0 +1 @@
1.12.1

View file

@ -82,7 +82,7 @@ class WopiController < ActionController::Base
}
response.headers['X-WOPI-HostEndpoint'] = ENV['WOPI_ENDPOINT_URL']
response.headers['X-WOPI-MachineName'] = ENV['WOPI_ENDPOINT_URL']
response.headers['X-WOPI-ServerVersion'] = Constants::APP_VERSION
response.headers['X-WOPI-ServerVersion'] = Scinote::Application::VERSION
render json: msg and return
end

View file

@ -19,7 +19,7 @@
<% if show_version %>
<%= image_tag('/images/logo.png', class: 'with-version', id: 'logo') %>
<span class="version">
<%= Constants::APP_VERSION %>
<%= Scinote::Application::VERSION %>
</span>
<% else %>
<%= image_tag('/images/logo.png', id: 'logo') %>

View file

@ -37,5 +37,8 @@ module Scinote
csv: 'text/plain',
wopitest: ['text/plain', 'inode/x-empty']
}
# sciNote Core Application version
VERSION = File.read(Rails.root.join('VERSION')).strip.freeze
end
end

View file

@ -196,9 +196,6 @@ class Constants
# Other
#=============================================================================
# Application version
APP_VERSION = '1.12.1'.freeze
TEXT_EXTRACT_FILE_TYPES = [
'application/pdf',
'application/rtf',