build

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildCmd = &cobra.Command{
	Use:   "build ",
	Short: "Run a build and post it to hyphen",
	Long: `
The build command runs a build and uploads it to hyphen without deploying.

Usage:
	hyphen build [flags]

Examples:
hyphen build

Use 'hyphen build --help' for more information about available flags.
`,
	Args: cobra.RangeArgs(0, 1),
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		return user.ErrorIfNotAuthenticated()
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		printer = cprint.NewCPrinter(flags.VerboseFlag)
		printer.SetFormat(outputFormatFlag)

		result, runErr := runBuild(cmd)
		if runErr != nil {
			if printer.IsJSON() {
				emitFailure(printer, map[string]any{}, runErr)

				cmd.SilenceErrors = true
				cmd.SilenceUsage = true
			}
			return runErr
		}

		return printer.Emit(result)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL