Commit ff346c01fac3eb0c588d493ac4c848340b4ec0c4
1 parent
a735ce2a
Exists in
master
and in
4 other branches
Check git version in gitlab:check
Showing
1 changed file
with
15 additions
and
0 deletions
Show diff stats
lib/tasks/gitlab/check.rake
... | ... | @@ -24,6 +24,7 @@ namespace :gitlab do |
24 | 24 | check_init_script_up_to_date |
25 | 25 | check_satellites_exist |
26 | 26 | check_redis_version |
27 | + check_git_version | |
27 | 28 | |
28 | 29 | finished_checking "GitLab" |
29 | 30 | end |
... | ... | @@ -663,4 +664,18 @@ namespace :gitlab do |
663 | 664 | puts "FAIL. Please update gitlab-shell to v#{required_version}".red |
664 | 665 | end |
665 | 666 | end |
667 | + | |
668 | + def check_git_version | |
669 | + print "Git version >= 1.7.10 ? ... " | |
670 | + | |
671 | + if run_and_match("git --version", /git version 1.7.10.\d/) | |
672 | + puts "yes".green | |
673 | + else | |
674 | + puts "no".red | |
675 | + try_fixing_it( | |
676 | + "Update your git to a version >= 1.7.10" | |
677 | + ) | |
678 | + fix_and_rerun | |
679 | + end | |
680 | + end | |
666 | 681 | end | ... | ... |