Feat cronjob #23

Merged
metal3d merged 28 commits from feat-cronjob into master 2022-06-10 14:15:18 +00:00
2 changed files with 6 additions and 10 deletions
Showing only changes of commit 5a8a1b135e - Show all commits

View File

@@ -5,7 +5,6 @@ import (
"katenary/generator/writers" "katenary/generator/writers"
"katenary/helm" "katenary/helm"
"katenary/update" "katenary/update"
"log"
"strconv" "strconv"
"github.com/spf13/cobra" "github.com/spf13/cobra"
@@ -71,7 +70,6 @@ func main() {
if err != nil { if err != nil {
writers.IndentSize = indentation writers.IndentSize = indentation
} }
log.Println(composeFiles)
Convert(*composeFiles, appversion, appName, chartDir, chartVersion, force) Convert(*composeFiles, appversion, appName, chartDir, chartVersion, force)
}, },
} }

View File

@@ -99,15 +99,13 @@ func Convert(composeFile []string, appVersion, appName, chartDir, chartVersion s
return return
} }
for i, c := range composeFile { composeFiles := composeFile
composeFile[i] = strings.TrimSpace(c) ComposeFile = composeFiles[0]
}
for _, composeFile := range composeFiles { for _, cf := range composeFiles {
_, err := os.Stat(composeFile) if _, err := os.Stat(cf); err != nil {
if err != nil { fmt.Printf("Compose file %s not found\n", cf)
fmt.Println("Error reading file:", composeFile) return
os.Exit(1)
} }
} }