diff options
Diffstat (limited to 'lib/gitlab/gitaly_client.rb')
-rw-r--r-- | lib/gitlab/gitaly_client.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb index 5534d4af439..1ce47ef2b05 100644 --- a/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb @@ -2,6 +2,8 @@ require 'gitaly' module Gitlab module GitalyClient + SERVER_VERSION_FILE = 'GITALY_SERVER_VERSION'.freeze + def self.gitaly_address if Gitlab.config.gitaly.socket_path "unix://#{Gitlab.config.gitaly.socket_path}" @@ -39,5 +41,10 @@ module Gitlab yield is_enabled end end + + def self.expected_server_version + path = Rails.root.join(SERVER_VERSION_FILE) + path.read.chomp + end end end |