Skip to content

Commit

Permalink
Merge pull request #3749 from rubygems/clone_from_local
Browse files Browse the repository at this point in the history
Clone from local
  • Loading branch information
deivid-rodriguez committed Jun 23, 2020
2 parents 03713f8 + 9c30463 commit 83dc347
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ubuntu-bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ jobs:
RGV: ${{ matrix.rgv }}
RUBYOPT: --disable-gems
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
path: bundler/tmp/rubygems
ref: ${{ matrix.rgv }}
fetch-depth: 0
if: matrix.rgv != '..'
- uses: actions/checkout@v2
with:
fetch-depth: 1
if: matrix.rgv == '..'
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/ubuntu-bundler3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
env:
RGV: ${{ matrix.rgv }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
path: bundler/tmp/rubygems
ref: ${{ matrix.rgv }}
fetch-depth: 0
if: matrix.rgv != '..'
- uses: actions/checkout@v2
with:
fetch-depth: 1
if: matrix.rgv == '..'
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
4 changes: 1 addition & 3 deletions bundler/spec/support/rubygems_version_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def reexec_if_needed
def switch_local_copy_if_needed
return unless local_copy_switch_needed?

sys_exec("git remote update", :dir => local_copy_path)
sys_exec("git checkout #{target_tag}", :dir => local_copy_path)

ENV["RGV"] = local_copy_path.to_s
Expand Down Expand Up @@ -107,8 +106,7 @@ def resolve_local_copy_path
rubygems_path = source_root.join("tmp/rubygems")

unless rubygems_path.directory?
rubygems_path.parent.mkpath
sys_exec("git clone https://github.com/rubygems/rubygems.git #{rubygems_path}")
sys_exec("git clone .. #{rubygems_path}", :dir => source_root)
end

rubygems_path
Expand Down

0 comments on commit 83dc347

Please sign in to comment.