cmd

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 29 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is set at build time
	Version = "dev"
	// Commit is set at build time
	Commit = "unknown"
	// Date is set at build time
	Date = "unknown"
)

Functions

func Execute

func Execute() error

Execute runs the root command

func NewBuildCommand

func NewBuildCommand(rootOpts *Options) *cobra.Command

NewBuildCommand creates the `build` verb: compile/collect artifacts and package them as bottles, emitting a bottles.json manifest.

func NewCompletionCommand

func NewCompletionCommand() *cobra.Command

NewCompletionCommand creates the completion command

func NewInitCommand

func NewInitCommand() *cobra.Command

NewInitCommand creates the init command

func NewPlatformsCommand

func NewPlatformsCommand(rootOpts *Options) *cobra.Command

NewPlatformsCommand creates the platforms command

func NewPushCommand

func NewPushCommand(rootOpts *Options) *cobra.Command

NewPushCommand creates the `push` verb: publish built bottles to the registry from a bottles.json manifest.

func NewReleaseCommand

func NewReleaseCommand(rootOpts *Options) *cobra.Command

NewReleaseCommand creates the `release` verb: generate the formula and commit it to the tap. Given a manifest (stdin or --input) it releases already-pushed bottles; otherwise it runs the full build+push pipeline first.

func NewRootCommand

func NewRootCommand() *cobra.Command

NewRootCommand creates the root cobra command

func NewVersionCommand

func NewVersionCommand() *cobra.Command

NewVersionCommand creates the version command

Types

type InitOptions

type InitOptions struct {
	Force bool
}

InitOptions holds options for the init command

type Manifest

type Manifest struct {
	SchemaVersion int             `json:"schemaVersion"`
	Formula       string          `json:"formula"`
	Version       string          `json:"version"`
	Rebuild       int             `json:"rebuild,omitempty"`
	RootURL       string          `json:"rootURL"`
	Description   string          `json:"description,omitempty"`
	Homepage      string          `json:"homepage,omitempty"`
	License       string          `json:"license,omitempty"`
	Source        ManifestSource  `json:"source"`
	Registry      ManifestReg     `json:"registry"`
	Tap           ManifestTap     `json:"tap"`
	Bottles       []ManifestEntry `json:"bottles"`
}

Manifest is the machine-readable contract between the build, push, and release verbs (`bottles.json`). Every verb emits it on stdout with -o json; push and release accept it on stdin or via --input.

type ManifestEntry

type ManifestEntry struct {
	Platform           string          `json:"platform"`
	OS                 string          `json:"os"`
	Arch               string          `json:"arch"`
	OSVersion          string          `json:"osVersion,omitempty"`
	OSVersionMajor     int             `json:"osVersionMajor,omitempty"`
	SHA256             string          `json:"sha256"`
	UncompressedSHA256 string          `json:"uncompressedSHA256"`
	UncompressedSize   int64           `json:"uncompressedSize"`
	Cellar             string          `json:"cellar"`
	Path               string          `json:"path,omitempty"`
	Ref                string          `json:"ref,omitempty"`
	Pushed             bool            `json:"pushed"`
	Tab                json.RawMessage `json:"tab,omitempty"`
}

type ManifestReg

type ManifestReg struct {
	Host     string `json:"host"`
	RootPath string `json:"rootPath"`
}

type ManifestSource

type ManifestSource struct {
	Type   string `json:"type"`
	URL    string `json:"url,omitempty"`    // source tarball URL
	SHA256 string `json:"sha256,omitempty"` // source tarball SHA256
	Commit string `json:"commit,omitempty"`
	Tag    string `json:"tag,omitempty"`
}

type ManifestTap

type ManifestTap struct {
	Owner       string `json:"owner"`
	Repo        string `json:"repo"`
	Branch      string `json:"branch"`
	FormulaPath string `json:"formulaPath"`
	CommitSHA   string `json:"commitSHA,omitempty"`
}

type Options

type Options struct {
	ConfigFile string
	LogLevel   string
	DryRun     bool
}

Options holds global command options

type PlatformsOptions

type PlatformsOptions struct {
	JSON bool
}

PlatformsOptions holds options for the platforms command

Jump to

Keyboard shortcuts

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