Commit 9655350c79e33ed765c62f892d65dd8c52284427
1 parent
ece30f53
Exists in
master
and in
4 other branches
Fix check.rake
Showing
1 changed file
with
32 additions
and
32 deletions
Show diff stats
lib/tasks/gitlab/check.rake
| @@ -48,7 +48,7 @@ namespace :gitlab do | @@ -48,7 +48,7 @@ namespace :gitlab do | ||
| 48 | see_database_guide, | 48 | see_database_guide, |
| 49 | "http://guides.rubyonrails.org/getting_started.html#configuring-a-database" | 49 | "http://guides.rubyonrails.org/getting_started.html#configuring-a-database" |
| 50 | ) | 50 | ) |
| 51 | - check_failed | 51 | + fix_and_rerun |
| 52 | end | 52 | end |
| 53 | end | 53 | end |
| 54 | 54 | ||
| @@ -65,7 +65,7 @@ namespace :gitlab do | @@ -65,7 +65,7 @@ namespace :gitlab do | ||
| 65 | "https://github.com/gitlabhq/gitlabhq/wiki/Migrate-from-SQLite-to-MySQL", | 65 | "https://github.com/gitlabhq/gitlabhq/wiki/Migrate-from-SQLite-to-MySQL", |
| 66 | see_database_guide | 66 | see_database_guide |
| 67 | ) | 67 | ) |
| 68 | - check_failed | 68 | + fix_and_rerun |
| 69 | end | 69 | end |
| 70 | end | 70 | end |
| 71 | 71 | ||
| @@ -85,7 +85,7 @@ namespace :gitlab do | @@ -85,7 +85,7 @@ namespace :gitlab do | ||
| 85 | for_more_information( | 85 | for_more_information( |
| 86 | see_installation_guide_section "GitLab" | 86 | see_installation_guide_section "GitLab" |
| 87 | ) | 87 | ) |
| 88 | - check_failed | 88 | + fix_and_rerun |
| 89 | end | 89 | end |
| 90 | end | 90 | end |
| 91 | 91 | ||
| @@ -110,7 +110,7 @@ namespace :gitlab do | @@ -110,7 +110,7 @@ namespace :gitlab do | ||
| 110 | for_more_information( | 110 | for_more_information( |
| 111 | see_installation_guide_section "GitLab" | 111 | see_installation_guide_section "GitLab" |
| 112 | ) | 112 | ) |
| 113 | - check_failed | 113 | + fix_and_rerun |
| 114 | end | 114 | end |
| 115 | end | 115 | end |
| 116 | 116 | ||
| @@ -129,7 +129,7 @@ namespace :gitlab do | @@ -129,7 +129,7 @@ namespace :gitlab do | ||
| 129 | for_more_information( | 129 | for_more_information( |
| 130 | see_installation_guide_section "Install Init Script" | 130 | see_installation_guide_section "Install Init Script" |
| 131 | ) | 131 | ) |
| 132 | - check_failed | 132 | + fix_and_rerun |
| 133 | end | 133 | end |
| 134 | end | 134 | end |
| 135 | 135 | ||
| @@ -155,7 +155,7 @@ namespace :gitlab do | @@ -155,7 +155,7 @@ namespace :gitlab do | ||
| 155 | for_more_information( | 155 | for_more_information( |
| 156 | see_installation_guide_section "Install Init Script" | 156 | see_installation_guide_section "Install Init Script" |
| 157 | ) | 157 | ) |
| 158 | - check_failed | 158 | + fix_and_rerun |
| 159 | end | 159 | end |
| 160 | end | 160 | end |
| 161 | 161 | ||
| @@ -171,7 +171,7 @@ namespace :gitlab do | @@ -171,7 +171,7 @@ namespace :gitlab do | ||
| 171 | try_fixing_it( | 171 | try_fixing_it( |
| 172 | "sudo -u gitlab -H bundle exec rake db:migrate" | 172 | "sudo -u gitlab -H bundle exec rake db:migrate" |
| 173 | ) | 173 | ) |
| 174 | - check_failed | 174 | + fix_and_rerun |
| 175 | end | 175 | end |
| 176 | end | 176 | end |
| 177 | 177 | ||
| @@ -201,7 +201,7 @@ namespace :gitlab do | @@ -201,7 +201,7 @@ namespace :gitlab do | ||
| 201 | for_more_information( | 201 | for_more_information( |
| 202 | "doc/raketasks/maintenance.md " | 202 | "doc/raketasks/maintenance.md " |
| 203 | ) | 203 | ) |
| 204 | - check_failed | 204 | + fix_and_rerun |
| 205 | end | 205 | end |
| 206 | end | 206 | end |
| 207 | end | 207 | end |
| @@ -222,7 +222,7 @@ namespace :gitlab do | @@ -222,7 +222,7 @@ namespace :gitlab do | ||
| 222 | for_more_information( | 222 | for_more_information( |
| 223 | see_installation_guide_section "GitLab" | 223 | see_installation_guide_section "GitLab" |
| 224 | ) | 224 | ) |
| 225 | - check_failed | 225 | + fix_and_rerun |
| 226 | end | 226 | end |
| 227 | end | 227 | end |
| 228 | 228 | ||
| @@ -242,7 +242,7 @@ namespace :gitlab do | @@ -242,7 +242,7 @@ namespace :gitlab do | ||
| 242 | for_more_information( | 242 | for_more_information( |
| 243 | see_installation_guide_section "GitLab" | 243 | see_installation_guide_section "GitLab" |
| 244 | ) | 244 | ) |
| 245 | - check_failed | 245 | + fix_and_rerun |
| 246 | end | 246 | end |
| 247 | end | 247 | end |
| 248 | end | 248 | end |
| @@ -290,7 +290,7 @@ namespace :gitlab do | @@ -290,7 +290,7 @@ namespace :gitlab do | ||
| 290 | for_more_information( | 290 | for_more_information( |
| 291 | see_installation_guide_section "GitLab" | 291 | see_installation_guide_section "GitLab" |
| 292 | ) | 292 | ) |
| 293 | - check_failed | 293 | + fix_and_rerun |
| 294 | end | 294 | end |
| 295 | end | 295 | end |
| 296 | 296 | ||
| @@ -308,7 +308,7 @@ namespace :gitlab do | @@ -308,7 +308,7 @@ namespace :gitlab do | ||
| 308 | for_more_information( | 308 | for_more_information( |
| 309 | see_installation_guide_section "System Users" | 309 | see_installation_guide_section "System Users" |
| 310 | ) | 310 | ) |
| 311 | - check_failed | 311 | + fix_and_rerun |
| 312 | end | 312 | end |
| 313 | end | 313 | end |
| 314 | 314 | ||
| @@ -332,7 +332,7 @@ namespace :gitlab do | @@ -332,7 +332,7 @@ namespace :gitlab do | ||
| 332 | see_installation_guide_section("Gitolite"), | 332 | see_installation_guide_section("Gitolite"), |
| 333 | "https://github.com/gitlabhq/gitlabhq/issues/1059" | 333 | "https://github.com/gitlabhq/gitlabhq/issues/1059" |
| 334 | ) | 334 | ) |
| 335 | - check_failed | 335 | + fix_and_rerun |
| 336 | end | 336 | end |
| 337 | end | 337 | end |
| 338 | 338 | ||
| @@ -352,7 +352,7 @@ namespace :gitlab do | @@ -352,7 +352,7 @@ namespace :gitlab do | ||
| 352 | for_more_information( | 352 | for_more_information( |
| 353 | see_installation_guide_section "Packages / Dependencies" | 353 | see_installation_guide_section "Packages / Dependencies" |
| 354 | ) | 354 | ) |
| 355 | - check_failed | 355 | + fix_and_rerun |
| 356 | end | 356 | end |
| 357 | end | 357 | end |
| 358 | 358 | ||
| @@ -378,7 +378,7 @@ namespace :gitlab do | @@ -378,7 +378,7 @@ namespace :gitlab do | ||
| 378 | for_more_information( | 378 | for_more_information( |
| 379 | see_installation_guide_section "Packages / Dependencies" | 379 | see_installation_guide_section "Packages / Dependencies" |
| 380 | ) | 380 | ) |
| 381 | - check_failed | 381 | + fix_and_rerun |
| 382 | end | 382 | end |
| 383 | end | 383 | end |
| 384 | end | 384 | end |
| @@ -434,7 +434,7 @@ namespace :gitlab do | @@ -434,7 +434,7 @@ namespace :gitlab do | ||
| 434 | for_more_information( | 434 | for_more_information( |
| 435 | see_installation_guide_section "Gitolite" | 435 | see_installation_guide_section "Gitolite" |
| 436 | ) | 436 | ) |
| 437 | - check_failed | 437 | + fix_and_rerun |
| 438 | end | 438 | end |
| 439 | 439 | ||
| 440 | # assumes #check_can_clone_gitolite_admin has been run before | 440 | # assumes #check_can_clone_gitolite_admin has been run before |
| @@ -466,7 +466,7 @@ namespace :gitlab do | @@ -466,7 +466,7 @@ namespace :gitlab do | ||
| 466 | for_more_information( | 466 | for_more_information( |
| 467 | see_installation_guide_section "Gitolite" | 467 | see_installation_guide_section "Gitolite" |
| 468 | ) | 468 | ) |
| 469 | - check_failed | 469 | + fix_and_rerun |
| 470 | ensure | 470 | ensure |
| 471 | FileUtils.rm_rf("/tmp/gitolite_gitlab_test") | 471 | FileUtils.rm_rf("/tmp/gitolite_gitlab_test") |
| 472 | end | 472 | end |
| @@ -488,7 +488,7 @@ namespace :gitlab do | @@ -488,7 +488,7 @@ namespace :gitlab do | ||
| 488 | for_more_information( | 488 | for_more_information( |
| 489 | see_installation_guide_section "Gitolite" | 489 | see_installation_guide_section "Gitolite" |
| 490 | ) | 490 | ) |
| 491 | - check_failed | 491 | + fix_and_rerun |
| 492 | end | 492 | end |
| 493 | end | 493 | end |
| 494 | 494 | ||
| @@ -511,7 +511,7 @@ namespace :gitlab do | @@ -511,7 +511,7 @@ namespace :gitlab do | ||
| 511 | for_more_information( | 511 | for_more_information( |
| 512 | see_installation_guide_section "Gitolite" | 512 | see_installation_guide_section "Gitolite" |
| 513 | ) | 513 | ) |
| 514 | - check_failed | 514 | + fix_and_rerun |
| 515 | end | 515 | end |
| 516 | end | 516 | end |
| 517 | 517 | ||
| @@ -537,7 +537,7 @@ namespace :gitlab do | @@ -537,7 +537,7 @@ namespace :gitlab do | ||
| 537 | for_more_information( | 537 | for_more_information( |
| 538 | see_installation_guide_section "Gitolite" | 538 | see_installation_guide_section "Gitolite" |
| 539 | ) | 539 | ) |
| 540 | - check_failed | 540 | + fix_and_rerun |
| 541 | end | 541 | end |
| 542 | end | 542 | end |
| 543 | 543 | ||
| @@ -582,7 +582,7 @@ namespace :gitlab do | @@ -582,7 +582,7 @@ namespace :gitlab do | ||
| 582 | for_more_information( | 582 | for_more_information( |
| 583 | see_installation_guide_section "Gitolite" | 583 | see_installation_guide_section "Gitolite" |
| 584 | ) | 584 | ) |
| 585 | - check_failed | 585 | + fix_and_rerun |
| 586 | end | 586 | end |
| 587 | end | 587 | end |
| 588 | 588 | ||
| @@ -611,7 +611,7 @@ namespace :gitlab do | @@ -611,7 +611,7 @@ namespace :gitlab do | ||
| 611 | for_more_information( | 611 | for_more_information( |
| 612 | see_installation_guide_section "Gitolite" | 612 | see_installation_guide_section "Gitolite" |
| 613 | ) | 613 | ) |
| 614 | - check_failed | 614 | + fix_and_rerun |
| 615 | end | 615 | end |
| 616 | end | 616 | end |
| 617 | 617 | ||
| @@ -635,7 +635,7 @@ namespace :gitlab do | @@ -635,7 +635,7 @@ namespace :gitlab do | ||
| 635 | for_more_information( | 635 | for_more_information( |
| 636 | see_installation_guide_section "Setup GitLab Hooks" | 636 | see_installation_guide_section "Setup GitLab Hooks" |
| 637 | ) | 637 | ) |
| 638 | - check_failed | 638 | + fix_and_rerun |
| 639 | end | 639 | end |
| 640 | end | 640 | end |
| 641 | 641 | ||
| @@ -666,7 +666,7 @@ namespace :gitlab do | @@ -666,7 +666,7 @@ namespace :gitlab do | ||
| 666 | for_more_information( | 666 | for_more_information( |
| 667 | see_installation_guide_section "Setup GitLab Hooks" | 667 | see_installation_guide_section "Setup GitLab Hooks" |
| 668 | ) | 668 | ) |
| 669 | - check_failed | 669 | + fix_and_rerun |
| 670 | end | 670 | end |
| 671 | end | 671 | end |
| 672 | 672 | ||
| @@ -688,7 +688,7 @@ namespace :gitlab do | @@ -688,7 +688,7 @@ namespace :gitlab do | ||
| 688 | for_more_information( | 688 | for_more_information( |
| 689 | see_installation_guide_section "Gitolite" | 689 | see_installation_guide_section "Gitolite" |
| 690 | ) | 690 | ) |
| 691 | - check_failed | 691 | + fix_and_rerun |
| 692 | end | 692 | end |
| 693 | end | 693 | end |
| 694 | 694 | ||
| @@ -712,7 +712,7 @@ namespace :gitlab do | @@ -712,7 +712,7 @@ namespace :gitlab do | ||
| 712 | for_more_information( | 712 | for_more_information( |
| 713 | see_installation_guide_section "Gitolite" | 713 | see_installation_guide_section "Gitolite" |
| 714 | ) | 714 | ) |
| 715 | - check_failed | 715 | + fix_and_rerun |
| 716 | end | 716 | end |
| 717 | end | 717 | end |
| 718 | 718 | ||
| @@ -738,7 +738,7 @@ namespace :gitlab do | @@ -738,7 +738,7 @@ namespace :gitlab do | ||
| 738 | for_more_information( | 738 | for_more_information( |
| 739 | see_installation_guide_section "Gitolite" | 739 | see_installation_guide_section "Gitolite" |
| 740 | ) | 740 | ) |
| 741 | - check_failed | 741 | + fix_and_rerun |
| 742 | end | 742 | end |
| 743 | end | 743 | end |
| 744 | 744 | ||
| @@ -772,7 +772,7 @@ namespace :gitlab do | @@ -772,7 +772,7 @@ namespace :gitlab do | ||
| 772 | for_more_information( | 772 | for_more_information( |
| 773 | "doc/raketasks/maintenance.md" | 773 | "doc/raketasks/maintenance.md" |
| 774 | ) | 774 | ) |
| 775 | - check_failed | 775 | + fix_and_rerun |
| 776 | end | 776 | end |
| 777 | end | 777 | end |
| 778 | end | 778 | end |
| @@ -808,7 +808,7 @@ namespace :gitlab do | @@ -808,7 +808,7 @@ namespace :gitlab do | ||
| 808 | for_more_information( | 808 | for_more_information( |
| 809 | "lib/support/rewrite-hooks.sh" | 809 | "lib/support/rewrite-hooks.sh" |
| 810 | ) | 810 | ) |
| 811 | - check_failed | 811 | + fix_and_rerun |
| 812 | next | 812 | next |
| 813 | end | 813 | end |
| 814 | 814 | ||
| @@ -822,7 +822,7 @@ namespace :gitlab do | @@ -822,7 +822,7 @@ namespace :gitlab do | ||
| 822 | for_more_information( | 822 | for_more_information( |
| 823 | "lib/support/rewrite-hooks.sh" | 823 | "lib/support/rewrite-hooks.sh" |
| 824 | ) | 824 | ) |
| 825 | - check_failed | 825 | + fix_and_rerun |
| 826 | end | 826 | end |
| 827 | end | 827 | end |
| 828 | end | 828 | end |
| @@ -880,7 +880,7 @@ namespace :gitlab do | @@ -880,7 +880,7 @@ namespace :gitlab do | ||
| 880 | see_installation_guide_section("Install Init Script"), | 880 | see_installation_guide_section("Install Init Script"), |
| 881 | "see log/resque.log for possible errors" | 881 | "see log/resque.log for possible errors" |
| 882 | ) | 882 | ) |
| 883 | - check_failed | 883 | + fix_and_rerun |
| 884 | end | 884 | end |
| 885 | end | 885 | end |
| 886 | end | 886 | end |
| @@ -889,7 +889,7 @@ namespace :gitlab do | @@ -889,7 +889,7 @@ namespace :gitlab do | ||
| 889 | # Helper methods | 889 | # Helper methods |
| 890 | ########################## | 890 | ########################## |
| 891 | 891 | ||
| 892 | - def check_failed | 892 | + def fix_and_rerun |
| 893 | puts " Please #{"fix the error above"} and rerun the checks.".red | 893 | puts " Please #{"fix the error above"} and rerun the checks.".red |
| 894 | end | 894 | end |
| 895 | 895 |