go-james: github.com/pieterclaerhout/go-james/cmd/packager Index | Files

package packager

import "github.com/pieterclaerhout/go-james/cmd/packager"

Index

Package Files

main.go

Variables

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: false,
        },
    },
    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

Package packager imports 4 packages (graph) and is imported by 1 packages. Updated 2019-10-19. Refresh now. Tools for package owners.