forked from LaconicNetwork/kompose
added support for multiple-compose files
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ var convertCmd = &cobra.Command{
|
||||
CreateChart: ConvertChart,
|
||||
GenerateYaml: ConvertYaml,
|
||||
Replicas: ConvertReplicas,
|
||||
InputFile: GlobalFile,
|
||||
InputFiles: GlobalFiles,
|
||||
OutFile: ConvertOut,
|
||||
Provider: strings.ToLower(GlobalProvider),
|
||||
CreateD: ConvertDeployment,
|
||||
|
||||
+4
-4
@@ -38,10 +38,10 @@ var downCmd = &cobra.Command{
|
||||
|
||||
// Create the Convert options.
|
||||
DownOpt = kobject.ConvertOptions{
|
||||
Replicas: DownReplicas,
|
||||
InputFile: GlobalFile,
|
||||
Provider: strings.ToLower(GlobalProvider),
|
||||
EmptyVols: DownEmptyVols,
|
||||
Replicas: DownReplicas,
|
||||
InputFiles: GlobalFiles,
|
||||
Provider: strings.ToLower(GlobalProvider),
|
||||
EmptyVols: DownEmptyVols,
|
||||
}
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
||||
+3
-2
@@ -40,8 +40,9 @@ func (errorOnWarningHook) Fire(entry *logrus.Entry) error {
|
||||
}
|
||||
|
||||
var (
|
||||
GlobalBundle, GlobalFile, GlobalProvider string
|
||||
GlobalBundle, GlobalProvider string
|
||||
GlobalVerbose, GlobalSuppressWarnings, GlobalErrorOnWarning bool
|
||||
GlobalFiles []string
|
||||
)
|
||||
|
||||
var RootCmd = &cobra.Command{
|
||||
@@ -86,7 +87,7 @@ func init() {
|
||||
RootCmd.PersistentFlags().BoolVarP(&GlobalVerbose, "verbose", "v", false, "verbose output")
|
||||
RootCmd.PersistentFlags().BoolVar(&GlobalSuppressWarnings, "suppress-warnings", false, "Suppress all warnings")
|
||||
RootCmd.PersistentFlags().BoolVar(&GlobalErrorOnWarning, "error-on-warning", false, "Treat any warning as an error")
|
||||
RootCmd.PersistentFlags().StringVarP(&GlobalFile, "file", "f", "docker-compose.yml", "Specify an alternative compose file")
|
||||
RootCmd.PersistentFlags().StringArrayVarP(&GlobalFiles, "file", "f", []string{}, "Specify an alternative compose file")
|
||||
RootCmd.PersistentFlags().StringVarP(&GlobalBundle, "bundle", "b", "", "Specify a Distributed Application GlobalBundle (DAB) file")
|
||||
RootCmd.PersistentFlags().StringVar(&GlobalProvider, "provider", "kubernetes", "Specify a provider. Kubernetes or OpenShift.")
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ var upCmd = &cobra.Command{
|
||||
|
||||
// Create the Convert options.
|
||||
UpOpt = kobject.ConvertOptions{
|
||||
Replicas: UpReplicas,
|
||||
InputFile: GlobalFile,
|
||||
Provider: strings.ToLower(GlobalProvider),
|
||||
EmptyVols: UpEmptyVols,
|
||||
Replicas: UpReplicas,
|
||||
InputFiles: GlobalFiles,
|
||||
Provider: strings.ToLower(GlobalProvider),
|
||||
EmptyVols: UpEmptyVols,
|
||||
}
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
||||
Reference in New Issue
Block a user