Skip to content

Commit

Permalink
bootc-image-builder/main: improve command line help
Browse files Browse the repository at this point in the history
  • Loading branch information
schuellerf committed Dec 20, 2024
1 parent 27e84cc commit 6240341
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bib/cmd/bootc-image-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,25 +586,30 @@ func cmdVersion(_ *cobra.Command, _ []string) error {
func buildCobraCmdline() (*cobra.Command, error) {
rootCmd := &cobra.Command{
Use: "bootc-image-builder",
Long: "create a bootable image from an ostree native container",
Long: "Create a bootable image from an ostree native container",
PersistentPreRunE: rootPreRunE,
SilenceErrors: true,
}

rootCmd.PersistentFlags().StringVar(&rootLogLevel, "log-level", "", "logging level (debug, info, error); default error")

buildCmd := &cobra.Command{
Use: "build",
Long: rootCmd.Long,
Use: "build IMAGE_NAME",
Short: rootCmd.Long + " (default command)",
Long: rootCmd.Long + "\n" +
"(default action if no command is given)\n" +
"IMAGE_NAME: container image to build into a bootable image",
Args: cobra.ExactArgs(1),
DisableFlagsInUseLine: true,
RunE: cmdBuild,
SilenceUsage: true,
Example: rootCmd.Use + " build quay.io/centos-bootc/centos-bootc:stream9\n" +
rootCmd.Use + " quay.io/centos-bootc/centos-bootc:stream9\n",
}
rootCmd.AddCommand(buildCmd)
manifestCmd := &cobra.Command{
Use: "manifest",
Long: rootCmd.Long,
Short: "Only create the manifest but don't build the image.",
Args: cobra.ExactArgs(1),
DisableFlagsInUseLine: true,
RunE: cmdManifest,
Expand Down

0 comments on commit 6240341

Please sign in to comment.