Skip to content

Commit

Permalink
Merge pull request #17121 from daeho-ro/livecheck-ssh-git
Browse files Browse the repository at this point in the history
download_strategy: add ssh://git scheme for git download strategy
  • Loading branch information
MikeMcQuaid authored Apr 21, 2024
2 parents c9d5b4a + 5680ffe commit eead9dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/download_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,8 @@ def self.detect_from_url(url)
GitHubGitDownloadStrategy
when %r{^https?://.+\.git$},
%r{^git://},
%r{^https?://git\.sr\.ht/[^/]+/[^/]+$}
%r{^https?://git\.sr\.ht/[^/]+/[^/]+$},
%r{^ssh://git}
GitDownloadStrategy
when %r{^https?://www\.apache\.org/dyn/closer\.cgi},
%r{^https?://www\.apache\.org/dyn/closer\.lua}
Expand Down
6 changes: 6 additions & 0 deletions Library/Homebrew/test/download_strategies/detector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
it { is_expected.to eq(GitDownloadStrategy) }
end

context "when given SSH Git URL" do
let(:url) { "ssh://[email protected]/foo.git" }

it { is_expected.to eq(GitDownloadStrategy) }
end

context "when given a GitHub Git URL" do
let(:url) { "https://github.com/homebrew/brew.git" }

Expand Down

0 comments on commit eead9dd

Please sign in to comment.