feat: add http source with support for environment variables

This commit is contained in:
Technofab 2022-11-29 16:07:42 +01:00
parent 3dfb3453fa
commit 428608f190
No known key found for this signature in database
GPG key ID: A0AA746B951C8830
4 changed files with 203 additions and 87 deletions

View file

@ -300,10 +300,12 @@ func download(d deps.Dependency, vendorDir, pathToParentModule string) (*deps.De
}
p = NewLocalPackage(&deps.Local{Directory: modulePath})
case d.Source.HttpSource != nil:
p = NewHttpPackage(d.Source.HttpSource)
}
if p == nil {
return nil, errors.New("either git or local source is required")
return nil, errors.New("either git, local or http source is required")
}
version, err := p.Install(context.TODO(), d.Name(), vendorDir, d.Version)