dep

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NameKey is the name of the git repo target.
	NameKey = "name"
	// RemoteKey is the remote address of this git repo.
	RemoteKey = "remote"
	// CommitKey is the full commit SHA of the source to download.
	CommitKey = "commit"
)
View Source
const (
	// DepsFile is the file name that stores remote module info.
	DepsFile = "isopod.deps"
)

Variables

View Source
var (

	// RequiredFields is the list of required fields to initialize a GitRepo target.
	RequiredFields = []string{NameKey, RemoteKey, CommitKey}
)
View Source
var (

	// Workspace is the directory that stages all Isopod-managed remote modules.
	Workspace = "/tmp/isopod-workspace"
)

Functions

func Load

func Load(entryfile string) error

Load processes the file that stores Isopod dependencies and registers them with the module loader to support subsequent load() statements.

func NewGitRepoBuiltin

func NewGitRepoBuiltin() *starlark.Builtin

NewGitRepoBuiltin creates a new git_repository built-in.

func Shellf

func Shellf(format string, a ...interface{}) (string, error)

Shellf execute the given shell command and wait until it finishes. Then return the combined stdout and stderr, and error if any.

Types

type AbstractDependency

type AbstractDependency struct {
	*addon.SkyCtx
	// contains filtered or unexported fields
}

AbstractDependency contains the common impl of all loader.Dependency. Specifically, it offers easy parsing of

dependency_directive(foo="bar", baz="qux")

func NewAbstractDependency

func NewAbstractDependency(
	typeStr string,
	requiredFields []string,
	kwargs []starlark.Tuple,
) (*AbstractDependency, error)

NewAbstractDependency creates a new AbstractDependency.

func (*AbstractDependency) String

func (a *AbstractDependency) String() string

String implements starlark.Value.String.

func (*AbstractDependency) Type

func (a *AbstractDependency) Type() string

Type implements starlark.Value.Type.

type GitCloneParams

type GitCloneParams struct {
	OutputDir, GitRemoteURL, GitCommitSHA string
}

GitCloneParams is used to templatize git clone command.

type GitRepo

type GitRepo struct {
	*AbstractDependency
	// contains filtered or unexported fields
}

GitRepo represents Isopod module source as remote git repo.

func (*GitRepo) Fetch

func (g *GitRepo) Fetch() error

Fetch is part of the Dependency interface. It downloads the source of this dependency.

func (*GitRepo) LocalDir

func (g *GitRepo) LocalDir() string

LocalDir returns the path to the directory storing the source.

func (*GitRepo) Name

func (g *GitRepo) Name() string

Name returns the name of this git repo target.

func (*GitRepo) Version added in v1.3.2

func (g *GitRepo) Version() string

Version returns the version of this git repo target.

Jump to

Keyboard shortcuts

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