File tree Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,15 @@ namespace :travis do
250
250
end
251
251
252
252
each_project_with_common_travis_build do |name |
253
+ if system ( "git show-branch #{ branch_name } > /dev/null 2> /dev/null" )
254
+ puts "Branch #{ branch_name } already exists, delete? [Y/n] or rename new branch? [r[ename] <name>]"
255
+ input = STDIN . gets . downcase
256
+ if input =~ /^y/
257
+ `git branch -D #{ branch_name } `
258
+ elsif input =~ /^r(?:ename)? (.*)$/
259
+ branch_name = $1
260
+ end
261
+ end
253
262
sh "git checkout -b #{ branch_name } "
254
263
255
264
files . each do |file |
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ if is_mri; then
10
10
clone_repo " rspec-expectations"
11
11
clone_repo " rspec-mocks"
12
12
13
- if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance " ] ; then
13
+ if rspec_support_compatible ; then
14
14
clone_repo " rspec-support"
15
15
fi
16
16
Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ function is_mri_192 {
49
49
fi
50
50
}
51
51
52
+ function rspec_support_compatible {
53
+ if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance" ] && [ " $MAINTENANCE_BRANCH " != " 2-14-maintenance" ]; then
54
+ return 0
55
+ else
56
+ return 1
57
+ fi
58
+ }
59
+
60
+
52
61
function clone_repo {
53
62
if [ ! -d $1 ]; then # don't clone if the dir is already there
54
63
travis_retry git clone git://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if is_mri; then
11
11
run_spec_suite_for " rspec-expectations"
12
12
run_spec_suite_for " rspec-mocks"
13
13
14
- if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance " ] ; then
14
+ if rspec_support_compatible ; then
15
15
run_spec_suite_for " rspec-support"
16
16
fi
17
17
else
You can’t perform that action at this time.
0 commit comments