Skip to content

Commit

Permalink
fix: remove aqua-local.yaml
Browse files Browse the repository at this point in the history
aqua-local.yaml is unnecessary anymore.
We test packages in the container.
  • Loading branch information
suzuki-shunsuke committed Oct 24, 2023
1 parent eab46b7 commit 84dbd6b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 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
}

0 comments on commit 84dbd6b

Please sign in to comment.