BigW Consortium Gitlab

Commit 7f04a417 by Dmitriy Zaporozhets

Merge branch 'shell-version-warning' into 'master'

Warn when gitlab-shell version doesn't match requirement. Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/1791. See merge request !495
parents 3092e7f8 f915a4b8
......@@ -78,6 +78,7 @@ v 7.9.3
- Contains no changes
- Add icons to Add dropdown items.
- Allow admin to create public deploy keys that are accessible to any project.
- Warn when gitlab-shell version doesn't match requirement.
v 7.9.2
......
......@@ -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
......@@ -240,7 +240,7 @@ module Gitlab
gitlab_shell_version_file = "#{gitlab_shell_path}/VERSION"
if File.readable?(gitlab_shell_version_file)
File.read(gitlab_shell_version_file)
File.read(gitlab_shell_version_file).chomp
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment