This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ if is_mri; then
1212 clone_repo " rspec-core"
1313 clone_repo " rspec-expectations"
1414 clone_repo " rspec-mocks"
15- clone_repo " rspec-rails"
15+ if requires_rspec_rails_maintenance_branch; then
16+ clone_repo " rspec-rails" " 4-0-maintenance"
17+ else
18+ clone_repo " rspec-rails"
19+ fi
1620
1721 if rspec_support_compatible; then
1822 clone_repo " rspec-support"
Original file line number Diff line number Diff line change 1919
2020function clone_repo {
2121 if [ ! -d $1 ]; then # don't clone if the dir is already there
22- travis_retry eval " git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH "
22+ if [ -z " $2 " ]; then
23+ BRANCH_TO_CLONE=" ${MAINTENANCE_BRANCH?} " ;
24+ else
25+ BRANCH_TO_CLONE=" $2 " ;
26+ fi ;
27+
28+ travis_retry eval " git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?} "
2329 fi ;
2430}
2531
Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ function rspec_rails_compatible {
8181 fi
8282}
8383
84+ function requires_rspec_rails_maintenance_branch {
85+ if [ " $MAINTENANCE_BRANCH " == " 3-10-maintenance" ]; then
86+ return 0
87+ else
88+ return 1
89+ fi
90+ }
91+
8492function rspec_support_compatible {
8593 if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance" ] && [ " $MAINTENANCE_BRANCH " != " 2-14-maintenance" ]; then
8694 return 0
You can’t perform that action at this time.
0 commit comments