summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-06 14:02:49 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-06 14:02:49 +0200
commitf915a4b80fdae28492e6c630534d8b66462f670a (patch)
tree54fc70863abcbf119511336732a6bf8335af98bc /config
parent45ca39e81bf857cdb58b1a184b8fab0e56c200f7 (diff)
downloadgitlab-ce-f915a4b80fdae28492e6c630534d8b66462f670a.tar.gz
Warn when gitlab-shell version doesn't match requirement.shell-version-warning
Diffstat (limited to 'config')
-rw-r--r--config/initializers/5_backend.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/5_backend.rb b/config/initializers/5_backend.rb
index 7c2e7f39000..80d641d73a3 100644
--- a/config/initializers/5_backend.rb
+++ b/config/initializers/5_backend.rb
@@ -6,3 +6,10 @@ require Rails.root.join("lib", "gitlab", "backend", "shell")
# GitLab shell adapter
require Rails.root.join("lib", "gitlab", "backend", "shell_adapter")
+
+required_version = Gitlab::VersionInfo.parse(Gitlab::Shell.version_required)
+current_version = Gitlab::VersionInfo.parse(Gitlab::Shell.new.version)
+
+unless current_version.valid? && required_version <= current_version
+ warn "WARNING: This version of GitLab depends on gitlab-shell #{required_version}, but you're running #{current_version}. Please update gitlab-shell."
+end