@@ -5,6 +5,7 @@ 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"
|
||||||
@@ -70,6 +71,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
writers.IndentSize = indentation
|
writers.IndentSize = indentation
|
||||||
}
|
}
|
||||||
|
log.Println("ComposeFile:", composeFile)
|
||||||
Convert(composeFile, appversion, appName, chartDir, force)
|
Convert(composeFile, appversion, appName, chartDir, force)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@@ -93,9 +93,12 @@ func detectGitVersion() (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Convert(composeFile, appVersion, appName, chartDir string, force bool) {
|
func Convert(composeFile, appVersion, appName, chartDir string, force bool) {
|
||||||
composeFound := FindComposeFile()
|
if len(composeFile) == 0 {
|
||||||
|
fmt.Println("No compose file given")
|
||||||
|
return
|
||||||
|
}
|
||||||
_, err := os.Stat(ComposeFile)
|
_, err := os.Stat(ComposeFile)
|
||||||
if !composeFound && err != nil {
|
if err != nil {
|
||||||
fmt.Println("No compose file found")
|
fmt.Println("No compose file found")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
@@ -131,7 +134,7 @@ func Convert(composeFile, appVersion, appName, chartDir string, force bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse the compose file now
|
// Parse the compose file now
|
||||||
p := compose.NewParser(ComposeFile)
|
p := compose.NewParser(composeFile)
|
||||||
p.Parse(appName)
|
p.Parse(appName)
|
||||||
|
|
||||||
// start generator
|
// start generator
|
||||||
|
Reference in New Issue
Block a user