Documentation
¶
Index ¶
- Variables
- func Execute() error
- func GetCacheDir() (string, error)
- func NewBuildCommand(rootOpts *Options) *cobra.Command
- func NewCompletionCommand() *cobra.Command
- func NewInitCommand() *cobra.Command
- func NewPlatformsCommand(rootOpts *Options) *cobra.Command
- func NewPushCommand(rootOpts *Options) *cobra.Command
- func NewReleaseCommand(rootOpts *Options) *cobra.Command
- func NewRootCommand() *cobra.Command
- func NewVersionCommand() *cobra.Command
- type InitOptions
- type Manifest
- type ManifestEntry
- type ManifestReg
- type ManifestSource
- type ManifestTap
- type Options
- type PlatformsOptions
Constants ¶
This section is empty.
Variables ¶
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 GetCacheDir ¶
GetCacheDir returns the cache directory for gobottle
func NewBuildCommand ¶
NewBuildCommand creates the `build` verb: compile/collect artifacts and package them as bottles, emitting a bottles.json manifest.
func NewCompletionCommand ¶
NewCompletionCommand creates the completion command
func NewPlatformsCommand ¶
NewPlatformsCommand creates the platforms command
func NewPushCommand ¶
NewPushCommand creates the `push` verb: publish built bottles to the registry from a bottles.json manifest.
func NewReleaseCommand ¶
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 ¶
NewRootCommand creates the root cobra command
func NewVersionCommand ¶
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 ManifestSource ¶
type ManifestTap ¶
type PlatformsOptions ¶
PlatformsOptions holds options for the platforms command