build_all_platforms

package
v0.77.0-dev-2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "build-all-platforms",
	Short:   "Build for All Platforms",
	Aliases: []string{"build-all"},
	Args:    cobra.NoArgs,
	Run: func(c *cobra.Command, args []string) {
		binName := getBinNameOrDie()
		scripts := []string{
			"GOOS=linux GOARCH=amd64 go build -o " + binName + "_linux_amd64",
			"GOOS=linux GOARCH=arm64 go build -o " + binName + "_linux_arm64",
			"GOOS=darwin GOARCH=amd64 go build -o " + binName + "_darwin_amd64",
			"GOOS=darwin GOARCH=arm64 go build -o " + binName + "_darwin_arm64",
			"GOOS=windows GOARCH=amd64 go build -o " + binName + "_windows_amd64",
			"GOOS=windows GOARCH=arm64 go build -o " + binName + "_windows_arm64",
		}
		for _, script := range scripts {
			fmt.Println(script)
			if FlagDryRun {
				continue
			}
			err := exec_utils.ExecShOut(script)
			if err != nil {
				log.Fatalln(err)
			}
		}
	},
}
View Source
var FlagDryRun bool

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