diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-23 14:19:48 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-23 14:19:48 +0000 |
commit | 326fb383326f03d89af9dcf7d1fb72e0fab59a0f (patch) | |
tree | 8ca2b932ca248afd0d0136c2ca67f8d18e3919d7 | |
parent | a7c5d36493f0e0e189308f8f0ac1468223d50fe9 (diff) | |
parent | 059f3a34accb28900a5fad4de2a736d32529a641 (diff) | |
download | gitlab-ce-326fb383326f03d89af9dcf7d1fb72e0fab59a0f.tar.gz |
Merge branch 'ruby-rake-check' into 'master'
Ruby rake check
Fix #1456
See merge request !989
-rw-r--r-- | lib/tasks/gitlab/check.rake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 28fc56591cb..3f219261abe 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -27,6 +27,7 @@ namespace :gitlab do check_projects_have_namespace check_satellites_exist check_redis_version + check_ruby_version check_git_version finished_checking "GitLab" @@ -816,6 +817,23 @@ namespace :gitlab do end end + def check_ruby_version + required_version = Gitlab::VersionInfo.new(2, 0, 0) + current_version = Gitlab::VersionInfo.parse(run(%W(ruby --version))) + + print "Ruby version >= #{required_version} ? ... " + + if current_version.valid? && required_version <= current_version + puts "yes (#{current_version})".green + else + puts "no".red + try_fixing_it( + "Update your ruby to a version >= #{required_version} from #{current_version}" + ) + fix_and_rerun + end + end + def check_git_version required_version = Gitlab::VersionInfo.new(1, 7, 10) current_version = Gitlab::VersionInfo.parse(run(%W(#{Gitlab.config.git.bin_path} --version))) |