Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/cmd/cmds/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmds
import (
"github.com/input-output-hk/catalyst-forge/cli/pkg/earthly"
"github.com/input-output-hk/catalyst-forge/cli/pkg/run"
"github.com/input-output-hk/catalyst-forge/lib/tools/earthfile"
te "github.com/input-output-hk/catalyst-forge/lib/tools/earthly"
)

type RunCmd struct {
Expand All @@ -15,7 +15,7 @@ type RunCmd struct {
}

func (c *RunCmd) Run(ctx run.RunContext) error {
ref, err := earthfile.ParseEarthfileRef(c.Path)
ref, err := te.ParseEarthfileRef(c.Path)
if err != nil {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions cli/pkg/scan/earthfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"path/filepath"
"strings"

"github.com/input-output-hk/catalyst-forge/lib/tools/earthfile"
"github.com/input-output-hk/catalyst-forge/lib/tools/earthly"
w "github.com/input-output-hk/catalyst-forge/lib/tools/walker"
)

// ScanEarthfiles scans the given root path for Earthfiles and returns a map
// that maps the path of the Earthfile to the targets defined in the Earthfile.
func ScanEarthfiles(rootPath string, walker w.Walker, logger *slog.Logger) (map[string]earthfile.Earthfile, error) {
earthfiles := make(map[string]earthfile.Earthfile)
func ScanEarthfiles(rootPath string, walker w.Walker, logger *slog.Logger) (map[string]earthly.Earthfile, error) {
earthfiles := make(map[string]earthly.Earthfile)

err := walker.Walk(rootPath, func(path string, fileType w.FileType, openFile func() (w.FileSeeker, error)) error {
if fileType != w.FileTypeFile {
Expand All @@ -30,7 +30,7 @@ func ScanEarthfiles(rootPath string, walker w.Walker, logger *slog.Logger) (map[
defer file.Close()

logger.Info("parsing Earthfile", "path", path)
earthfile, err := earthfile.ParseEarthfile(context.Background(), file)
earthfile, err := earthly.ParseEarthfile(context.Background(), file)
if err != nil {
logger.Error("error parsing Earthfile", "path", path, "error", err)
return fmt.Errorf("error parsing %s: %w", path, err)
Expand Down
6 changes: 3 additions & 3 deletions foundry/operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rules:
- apiGroups:
- foundry.projectcatalyst.io
resources:
- releases
- releasedeployments
verbs:
- create
- delete
Expand All @@ -19,13 +19,13 @@ rules:
- apiGroups:
- foundry.projectcatalyst.io
resources:
- releases/finalizers
- releasedeployments/finalizers
verbs:
- update
- apiGroups:
- foundry.projectcatalyst.io
resources:
- releases/status
- releasedeployments/status
verbs:
- get
- patch
Expand Down
6 changes: 3 additions & 3 deletions lib/project/project/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/input-output-hk/catalyst-forge/lib/project/injector"
"github.com/input-output-hk/catalyst-forge/lib/project/secrets"
sb "github.com/input-output-hk/catalyst-forge/lib/schema/blueprint"
"github.com/input-output-hk/catalyst-forge/lib/tools/earthfile"
"github.com/input-output-hk/catalyst-forge/lib/tools/earthly"
"github.com/input-output-hk/catalyst-forge/lib/tools/fs"
"github.com/input-output-hk/catalyst-forge/lib/tools/fs/billy"
"github.com/input-output-hk/catalyst-forge/lib/tools/git"
Expand Down Expand Up @@ -97,15 +97,15 @@ func (p *DefaultProjectLoader) Load(projectPath string) (Project, error) {
return Project{}, fmt.Errorf("failed to check for Earthfile: %w", err)
}

var ef *earthfile.Earthfile
var ef *earthly.Earthfile
if exists {
p.logger.Info("Parsing Earthfile", "path", efPath)
eff, err := p.fs.Open(efPath)
if err != nil {
p.logger.Error("Failed to read Earthfile", "error", err, "path", efPath)
return Project{}, fmt.Errorf("failed to read Earthfile: %w", err)
}
efs, err := earthfile.ParseEarthfile(context.Background(), eff)
efs, err := earthly.ParseEarthfile(context.Background(), eff)
if err != nil {
p.logger.Error("Failed to parse Earthfile", "error", err, "path", efPath)
return Project{}, fmt.Errorf("failed to parse Earthfile: %w", err)
Expand Down
6 changes: 3 additions & 3 deletions lib/project/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/input-output-hk/catalyst-forge/lib/project/blueprint"
"github.com/input-output-hk/catalyst-forge/lib/project/secrets"
sb "github.com/input-output-hk/catalyst-forge/lib/schema/blueprint"
"github.com/input-output-hk/catalyst-forge/lib/tools/earthfile"
"github.com/input-output-hk/catalyst-forge/lib/tools/earthly"
"github.com/input-output-hk/catalyst-forge/lib/tools/git/repo"
)

Expand All @@ -20,7 +20,7 @@ type Project struct {
Blueprint sb.Blueprint

// Earthfile is the project Earthfile.
Earthfile *earthfile.Earthfile
Earthfile *earthly.Earthfile

// Name is the project name.
Name string
Expand Down Expand Up @@ -121,7 +121,7 @@ func (p *Project) Raw() blueprint.RawBlueprint {
func NewProject(
ctx *cue.Context,
repo *repo.GitRepo,
earthfile *earthfile.Earthfile,
earthfile *earthly.Earthfile,
name, path, repoRoot string,
blueprint sb.Blueprint,
tag *ProjectTag,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package earthfile
package earthly

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package earthfile
package earthly

import (
"context"
Expand Down
Loading