Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultProjectLoader ¶
type DefaultProjectLoader struct {
// contains filtered or unexported fields
}
DefaultProjectLoader is the default implementation of the ProjectLoader.
func NewCustomProjectLoader ¶
func NewCustomProjectLoader( fs afero.Fs, bl loader.BlueprintLoader, rl git.RepoLoader, runtimes []RuntimeData, logger *slog.Logger, ) DefaultProjectLoader
NewCustomProjectLoader creates a new DefaultProjectLoader with custom dependencies.
func NewDefaultProjectLoader ¶
func NewDefaultProjectLoader( ci, local bool, runtimes []RuntimeData, logger *slog.Logger, ) DefaultProjectLoader
NewDefaultProjectLoader creates a new DefaultProjectLoader.
type GitRuntime ¶
type GitRuntime struct {
// contains filtered or unexported fields
}
GitRuntime is a runtime data loader for git related data.
func NewGitRuntime ¶
func NewGitRuntime(logger *slog.Logger) *GitRuntime
NewGitRuntime creates a new GitRuntime.
type MonoTag ¶
MonoTag represents a monorepo tag.
func ParseMonoTag ¶
parseMonoTag parses a monorepo tag into its project and tag components.
type Project ¶
type Project struct { Blueprint schema.Blueprint CI bool Earthfile *earthfile.Earthfile Local bool Name string Path string Repo *gg.Repository RepoRoot string Tags TagInfo // contains filtered or unexported fields }
Project represents a project
func (*Project) GetRelativePath ¶
GetRelativePath returns the relative path of the project from the repo root.
func (*Project) RunTarget ¶
func (p *Project) RunTarget( target string, exec executor.Executor, store secrets.SecretStore, opts ...earthly.EarthlyExecutorOption, ) (map[string]earthly.EarthlyExecutionResult, error)
RunTarget runs the given Earthly target.
type ProjectLoader ¶
type ProjectLoader interface { // Load loads the project. Load(projectPath string) (Project, error) }
ProjectLoader is an interface for loading projects.
type RuntimeData ¶
RuntimeData is an interface for runtime data loaders.
func GetDefaultRuntimes ¶
func GetDefaultRuntimes(logger *slog.Logger) []RuntimeData
GetDefaultRuntimes returns the default runtime data loaders.
type Tagger ¶
type Tagger struct {
// contains filtered or unexported fields
}
Tagger parses tag information from projects.
func (*Tagger) GenerateTag ¶
GenerateTag generates a tag for the project based on the tagging strategy.
func (*Tagger) GetGitTag ¶
GetGitTag returns the git tag of the project. If the project is a monorepo, the tag is parsed and the project path is trimmed if necessary. If the project is not a monorepo, the tag is returned as is. If no git tag exists, or the project path does not match the monorepo tag, an empty string is returned.