mirror of
https://github.com/TECHNOFAB11/jsonnet-bundler.git
synced 2025-12-12 08:00:05 +01:00
feat: generic git https (#73)
Previously, only `github.com` was supported for HTTP cloning of packages. With this change, every git host using the http protocol (GitHub, Gitlab, Gitea) is supported :D
This commit is contained in:
parent
8f14d63f95
commit
0ba0ff5522
4 changed files with 127 additions and 19 deletions
|
|
@ -43,17 +43,17 @@ func TestParseDependency(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "Invalid",
|
||||
path: "github.com/foo",
|
||||
path: "example.com/foo",
|
||||
want: nil,
|
||||
},
|
||||
{
|
||||
name: "GitHub",
|
||||
path: "github.com/jsonnet-bundler/jsonnet-bundler",
|
||||
name: "GitHTTPS",
|
||||
path: "example.com/jsonnet-bundler/jsonnet-bundler",
|
||||
want: &deps.Dependency{
|
||||
Source: deps.Source{
|
||||
GitSource: &deps.Git{
|
||||
Scheme: deps.GitSchemeHTTPS,
|
||||
Host: "github.com",
|
||||
Host: "example.com",
|
||||
User: "jsonnet-bundler",
|
||||
Repo: "jsonnet-bundler",
|
||||
Subdir: "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue