pkg

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 22 Imported by: 4

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 added in v0.3.0

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

func Ensure added in v0.2.0

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 added in v0.2.0

func NewLocalPackage(source *deps.Local) Interface

type LocalPackage added in v0.2.0

type LocalPackage struct {
	Source *deps.Local
}

func (*LocalPackage) Install added in v0.2.0

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