packager

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PackageCmd = climax.Command{
	Name:  "package",
	Brief: "Build the main executable of your project for windows / linux / mac",
	Help:  "Build the main executable of your project for windows / linux / mac",
	Flags: []climax.Flag{
		{
			Name:     "verbose",
			Short:    "v",
			Usage:    `--verbose`,
			Help:     `print the names of packages as they are compiled.`,
			Variable: false,
		},
		{
			Name:     "concurrency",
			Short:    "c",
			Usage:    `--concurrency`,
			Help:     `how many package processes can run simultaneously (defaults to the number of CPUs).`,
			Variable: true,
		},
	},
	Handle: func(ctx climax.Context) int {

		verbose := ctx.Is("verbose")
		concurrency, _ := ctx.Get("concurrency")
		concurrencyAsInt, _ := strconv.Atoi(concurrency)

		tool := packager.Packager{
			Verbose:     verbose,
			Concurrency: concurrencyAsInt,
		}

		executor := internal.NewExecutor("")
		return executor.RunTool(tool, true)

	},
}

PackageCmd defines the package command

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