Skip to content

Commit

Permalink
fix: remove aqua-local.yaml (#464)
Browse files Browse the repository at this point in the history
* fix: remove aqua-local.yaml

aqua-local.yaml is unnecessary anymore.
We test packages in the container.

* refactor: remove unused functions
  • Loading branch information
suzuki-shunsuke authored Oct 24, 2023
1 parent eab46b7 commit ca53a19
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 139 deletions.
18 changes: 0 additions & 18 deletions pkg/initcmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ func Init(ctx context.Context) error {
if err := initAquaYAML(); err != nil {
return err
}
if err := initAquaLocalYAML(); err != nil {
return err
}
return nil
}

Expand All @@ -40,21 +37,6 @@ packages:
return nil
}

func initAquaLocalYAML() error {
if _, err := os.Stat("aqua-local.yaml"); err == nil {
return nil
}
fmt.Fprintln(os.Stderr, "Creating aqua-local.yaml")
if err := os.WriteFile("aqua-local.yaml", []byte(`---
# aqua - Declarative CLI Version Manager
# https://aquaproj.github.io/
packages:
`), filePermission); err != nil {
return fmt.Errorf("create aqua-local.yaml: %w", err)
}
return nil
}

func initRegistryYAML() error {
if _, err := os.Stat("registry.yaml"); err == nil {
return nil
Expand Down
11 changes: 0 additions & 11 deletions pkg/scaffold/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ e.g. $ aqua-registry scaffold cli/cli`)
if err := initcmd.Init(ctx); err != nil {
return err //nolint:wrapcheck
}
if err := aquaG(pkgFile); err != nil {
return err
}
return nil
}

Expand Down Expand Up @@ -74,11 +71,3 @@ func aquaGR(ctx context.Context, pkgName, pkgFilePath, rgFilePath string, cmds s
}
return nil
}

func aquaG(pkgFilePath string) error {
fmt.Fprintf(os.Stderr, "appending '- import: %s' to aqua-local.yaml\n", pkgFilePath)
if err := generateInsert("aqua-local.yaml", pkgFilePath); err != nil {
return err
}
return nil
}
9 changes: 0 additions & 9 deletions pkg/scaffold/error.go

This file was deleted.

101 changes: 0 additions & 101 deletions pkg/scaffold/insert.go

This file was deleted.

0 comments on commit ca53a19

Please sign in to comment.