pkg

package
v0.0.0-...-09f0ee1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GitQuiet = false
View Source
var (
	VersionMismatch = errors.New("multiple colliding versions specified")
)

Functions

func CleanLegacyName

func CleanLegacyName(list map[string]deps.Dependency)

func Ensure

func Ensure(direct v1.JsonnetFile, vendorDir string, oldLocks map[string]deps.Dependency) (map[string]deps.Dependency, error)

Ensure receives all direct packages, the directory to vendor into 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/ The full list of locked depedencies is returned

Types

type GitPackage

type GitPackage struct {
	Source *deps.Git
}

func (*GitPackage) Install

func (p *GitPackage) Install(ctx context.Context, name, dir, version string) (string, error)

type Interface

type Interface interface {
	Install(ctx context.Context, name, dir, version string) (lockVersion string, err error)
}

func NewGitPackage

func NewGitPackage(source *deps.Git) Interface

func NewLocalPackage

func NewLocalPackage(source *deps.Local) Interface

type LocalPackage

type LocalPackage struct {
	Source *deps.Local
}

func (*LocalPackage) Install

func (p *LocalPackage) Install(ctx context.Context, name, dir, version string) (lockVersion string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL