@@ -5,19 +5,17 @@ import (
5
5
"os"
6
6
"strings"
7
7
8
+ "github.com/docker/lunchbox/internal"
8
9
"github.com/docker/lunchbox/renderer"
9
10
"github.com/spf13/cobra"
10
11
"gopkg.in/yaml.v2"
11
12
)
12
13
13
14
var renderCmd = & cobra.Command {
14
- Use : "render <app-name> [-c <compose-files>...] [- e key=value...] [-s settings-file...]" ,
15
+ Use : "render <app-name> [-e key=value...] [-s settings-file...]" ,
15
16
Short : "Render the Compose file for this app" ,
16
17
Long : `Render generates a Compose file from the application's template and optional additional files.
17
- Override is provided in three different ways:
18
- - External Compose files or template Compose files can be specified with the -c flag.
19
- (Repeat the flag for multiple files). These files will be merged in order with
20
- the app's own Compose file.
18
+ Override is provided in different ways:
21
19
- External YAML settings files can be specified with the -f flag. All settings
22
20
files are merged in order, the app's settings coming first.
23
21
- Individual settings values can be passed directly on the command line with the
@@ -58,7 +56,13 @@ var renderEnv []string
58
56
59
57
func init () {
60
58
rootCmd .AddCommand (renderCmd )
61
- renderCmd .Flags ().StringArrayVarP (& renderComposeFiles , "compose-files" , "c" , []string {}, "Override Compose files" )
59
+ if internal .Experimental == "on" {
60
+ renderCmd .Use += " [-c <compose-files>...]"
61
+ renderCmd .Long += `- External Compose files or template Compose files can be specified with the -c flag.
62
+ (Repeat the flag for multiple files). These files will be merged in order with
63
+ the app's own Compose file.`
64
+ renderCmd .Flags ().StringArrayVarP (& renderComposeFiles , "compose-files" , "c" , []string {}, "Override Compose files" )
65
+ }
62
66
renderCmd .Flags ().StringArrayVarP (& renderSettingsFile , "settings-files" , "f" , []string {}, "Override settings files" )
63
67
renderCmd .Flags ().StringArrayVarP (& renderEnv , "set" , "s" , []string {}, "Override settings values" )
64
68
}
0 commit comments