diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-06 15:08:53 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-06 15:08:53 +0300 |
commit | ff346c01fac3eb0c588d493ac4c848340b4ec0c4 (patch) | |
tree | 092b01a1ae41aa4eea537ad6f2336a804c910348 | |
parent | a735ce2aa7da72242629a4452c33e7a1900fdd62 (diff) | |
download | gitlab-ce-ff346c01fac3eb0c588d493ac4c848340b4ec0c4.tar.gz |
Check git version in gitlab:check
-rw-r--r-- | lib/tasks/gitlab/check.rake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 773e496ee41..7e725a5e621 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -24,6 +24,7 @@ namespace :gitlab do check_init_script_up_to_date check_satellites_exist check_redis_version + check_git_version finished_checking "GitLab" end @@ -663,4 +664,18 @@ namespace :gitlab do puts "FAIL. Please update gitlab-shell to v#{required_version}".red end end + + def check_git_version + print "Git version >= 1.7.10 ? ... " + + if run_and_match("git --version", /git version 1.7.10.\d/) + puts "yes".green + else + puts "no".red + try_fixing_it( + "Update your git to a version >= 1.7.10" + ) + fix_and_rerun + end + end end |