Render: mark compose file override as experimental.
@@ -5,19 +5,17 @@ import (
"os"
"strings"
+ "github.com/docker/lunchbox/internal"
"github.com/docker/lunchbox/renderer"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
)
var renderCmd = &cobra.Command{
- Use: "render <app-name> [-c <compose-files>...] [-e key=value...] [-s settings-file...]",
+ Use: "render <app-name> [-e key=value...] [-s settings-file...]",
Short: "Render the Compose file for this app",
Long: `Render generates a Compose file from the application's template and optional additional files.
-Override is provided in three different ways:
-- External Compose files or template Compose files can be specified with the -c flag.
- (Repeat the flag for multiple files). These files will be merged in order with
- the app's own Compose file.
+Override is provided in different ways:
- External YAML settings files can be specified with the -f flag. All settings
files are merged in order, the app's settings coming first.
- Individual settings values can be passed directly on the command line with the
@@ -58,7 +56,13 @@ var renderEnv []string
func init() {
rootCmd.AddCommand(renderCmd)
+ if internal.Experimental == "on" {
+ renderCmd.Use += " [-c <compose-files>...]"
+ renderCmd.Long += `- External Compose files or template Compose files can be specified with the -c flag.
+ (Repeat the flag for multiple files). These files will be merged in order with
+ the app's own Compose file.`
renderCmd.Flags().StringArrayVarP(&renderComposeFiles, "compose-files", "c", []string{}, "Override Compose files")
+ }
renderCmd.Flags().StringArrayVarP(&renderSettingsFile, "settings-files", "f", []string{}, "Override settings files")
renderCmd.Flags().StringArrayVarP(&renderEnv, "set", "s", []string{}, "Override settings values")
}
