Warn when gitlab-shell version doesn't match requirement.
This commit is contained in:
parent
45ca39e81b
commit
f915a4b80f
3 changed files with 9 additions and 1 deletions
|
@ -62,6 +62,7 @@ v 7.10.0 (unreleased)
|
||||||
- Project labels are now available over the API under the "tag_list" field (Cristian Medina)
|
- Project labels are now available over the API under the "tag_list" field (Cristian Medina)
|
||||||
- Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz)
|
- Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz)
|
||||||
- Fix and improve help rendering (Sullivan Sénéchal)
|
- Fix and improve help rendering (Sullivan Sénéchal)
|
||||||
|
- Warn when gitlab-shell version doesn't match requirement.
|
||||||
|
|
||||||
|
|
||||||
v 7.9.2
|
v 7.9.2
|
||||||
|
|
|
@ -6,3 +6,10 @@ require Rails.root.join("lib", "gitlab", "backend", "shell")
|
||||||
|
|
||||||
# GitLab shell adapter
|
# GitLab shell adapter
|
||||||
require Rails.root.join("lib", "gitlab", "backend", "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"
|
gitlab_shell_version_file = "#{gitlab_shell_path}/VERSION"
|
||||||
|
|
||||||
if File.readable?(gitlab_shell_version_file)
|
if File.readable?(gitlab_shell_version_file)
|
||||||
File.read(gitlab_shell_version_file)
|
File.read(gitlab_shell_version_file).chomp
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue