Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
VersionMismatch = errors.New("multiple colliding versions specified")
)
Functions ¶
func Ensure ¶ added in v0.2.0
func Ensure(direct spec.JsonnetFile, vendorDir string, locks map[string]spec.Dependency) (map[string]spec.Dependency, error)
Ensure receives all direct packages as, the directory to vendor in and all known locks. It then makes sure all direct and nested dependencies are present in vendor at the correct version:
If the package is locked and the files in vendor match the sha256 checksum, nothing needs to be done. Otherwise, the package is retrieved from the upstream source and added into vendor. If previously locked, the sums are checked as well. In case a (nested) package is already present in the lock, the one from the lock takes precedence. This allows the user to set the desired version in case by `jb install`ing it.
Finally, all unknown files and directories are removed from vendor/
Types ¶
type GitPackage ¶
type Interface ¶
type Interface interface {
Install(ctx context.Context, name, dir, version string) (lockVersion string, err error)
}
func NewGitPackage ¶
func NewLocalPackage ¶ added in v0.2.0
func NewLocalPackage(source *spec.LocalSource) Interface
type LocalPackage ¶ added in v0.2.0
type LocalPackage struct {
Source *spec.LocalSource
}