refactor: create compose package

This commit is contained in:
2021-09-06 01:15:59 +02:00
parent e1a10723ce
commit b5d8fb1270
8 changed files with 172 additions and 152 deletions

View File

@ -23,9 +23,9 @@ var recipeLintCommand = &cli.Command{
Aliases: []string{"l"},
ArgsUsage: "<recipe>",
Action: func(c *cli.Context) error {
recipe := internal.ValidateRecipe(c)
recipeName := internal.ValidateRecipe(c)
pattern := fmt.Sprintf("%s/%s/compose**yml", config.APPS_DIR, recipe)
pattern := fmt.Sprintf("%s/%s/compose**yml", config.APPS_DIR, recipeName)
composeFiles, err := filepath.Glob(pattern)
if err != nil {
logrus.Fatal(err)
@ -42,7 +42,7 @@ var recipeLintCommand = &cli.Command{
}
envSampleProvided := false
envSample := fmt.Sprintf("%s/%s/.env.sample", config.APPS_DIR, recipe)
envSample := fmt.Sprintf("%s/%s/.env.sample", config.APPS_DIR, recipeName)
if _, err := os.Stat(envSample); !os.IsNotExist(err) {
envSampleProvided = true
}