summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-07-21 22:04:28 +0200
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-07-23 06:56:32 +0200
commitab419b08ce7741f3471439a9b912fdb504130615 (patch)
treecfc41ea03d80437dd7b934ec739dd1156af0cd5c
parent10d9df28ec3b494361abcee27ffddece580bbf3a (diff)
downloadgitlab-ce-ab419b08ce7741f3471439a9b912fdb504130615.tar.gz
If version file is unavailable unknown status
-rw-r--r--CHANGELOG2
-rw-r--r--lib/gitlab/workhorse.rb5
2 files changed, 3 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index e3a8c3731bf..71ae0589948 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@ v 8.11.0 (unreleased)
- Limit git rev-list output count to one in forced push check
- Retrieve rendered HTML from cache in one request
- Load project invited groups and members eagerly in ProjectTeam#fetch_members
+ - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska Ula Budziszewska)
v 8.10.0
- Fix profile activity heatmap to show correct day name (eanplatter)
@@ -164,7 +165,6 @@ v 8.10.0
- Export and import avatar as part of project import/export
- Fix migration corrupting import data for old version upgrades
- Show tooltip on GitLab export link in new project page
- - Add GitLab Workhorse version to admin dashboard (Katarzyna Kobierska)
v 8.9.6
- Fix importing of events under notes for GitLab projects. !5154
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb
index 97610b1f962..c6826a09bd2 100644
--- a/lib/gitlab/workhorse.rb
+++ b/lib/gitlab/workhorse.rb
@@ -77,9 +77,8 @@ module Gitlab
end
def version
- if File.readable?(File.join(Rails.root, VERSION_FILE))
- File.read(File.join(Rails.root, VERSION_FILE))
- end
+ path = Rails.root.join(VERSION_FILE)
+ path.readable? ? path.read.chomp : 'unknown'
end
protected