Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate renders a Ruby formula from the Formula model using the default template, or tmplText if non-empty (a user-supplied override receiving the same model).
func ToPascalCase ¶
ToPascalCase converts a string to PascalCase for Ruby class names Examples:
- "myapp" -> "Myapp"
- "my-app" -> "MyApp"
- "my_app" -> "MyApp"
- "myApp" -> "MyApp"
Types ¶
type BottleSpec ¶
type BottleSpec struct {
Platform string // e.g. "arm64_sonoma", "x86_64_linux"
SHA256 string // bottle tarball SHA256
Cellar string // e.g. ":any_skip_relocation" or an absolute path
}
BottleSpec represents one sha256 line in the bottle block.
type Formula ¶
type Formula struct {
Name string // Formula name (e.g., "myapp")
ClassName string // PascalCase name for Ruby class (derived if empty)
Description string // Short description (omitted if empty; brew audit wants it)
Homepage string // Project homepage URL
URL string // Source tarball URL
SHA256 string // Source tarball SHA256 (omitted if empty)
License string // SPDX identifier (omitted if empty)
Head *Head // Optional head stanza
// Bottle block
RootURL string // e.g. "https://ghcr.io/v2/myorg/tap" (formula name appended by brew)
Rebuild int // rebuild counter; emitted as `rebuild N` when > 0
Bottles []BottleSpec // one line per platform
// Body
Dependencies []string // depends_on lines
Conflicts []string // conflicts_with lines
Binaries []string // bin.install lines (first binary drives the default test)
Completions bool // generate_completions_from_executable for each binary
ExtraInstall []string // verbatim extra install lines
Caveats string // literal caveats text
Service string // verbatim service block body
Test Test // test block (defaults to `system bin/"<bin>", "--version"`)
}
Formula is the complete model from which a Homebrew formula is generated. gobottle owns the formula outright: every publish renders it from this model; there is no in-place editing of hand-written formulae.
type Head ¶
type Head struct {
URL string // git URL, e.g. https://github.com/owner/repo.git
Branch string // e.g. "main"
}
Head describes an optional `head` stanza.
Click to show internal directories.
Click to hide internal directories.