Skip to content

Commit 9de56dd

Browse files
authored
Merge pull request #2737 from rspec/fix-clone-issue
Clone rspec-metagem correctly
2 parents 0142b1e + fa5c197 commit 9de56dd

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

Gemfile-rspec-dependencies

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ branch = File.read(File.expand_path("../maintenance-branch", __FILE__)).chomp
44
if File.exist?(library_path) && !ENV['USE_GIT_REPOS']
55
gem lib, :path => library_path, :require => false
66
else
7-
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch, :require => false
7+
if lib == 'rspec'
8+
gem 'rspec', :git => "https://github.com/rspec/rspec-metagem.git", :branch => branch, :require => false
9+
else
10+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => branch, :require => false
11+
end
812
end
913
end

script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source script/functions.sh
77

88
pushd ..
99

10-
clone_repo "rspec"
10+
clone_repo "rspec-metagem" "rspec"
1111
clone_repo "rspec-core"
1212
clone_repo "rspec-expectations"
1313
clone_repo "rspec-mocks"

script/functions.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,14 @@ function documentation_enforced {
5454
}
5555

5656
function clone_repo {
57-
if [ ! -d $1 ]; then # don't clone if the dir is already there
58-
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH"
57+
if [ -z "$2" ]; then
58+
DIR_TARGET="$1"
59+
else
60+
DIR_TARGET="$2"
61+
fi
62+
63+
if [ ! -d $DIR_TARGET ]; then # don't clone if the dir is already there
64+
ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH $DIR_TARGET"
5965
fi;
6066
}
6167

0 commit comments

Comments
 (0)