Documentation
¶
Index ¶
- type Updater
- func (u *Updater) BranchExists(ctx context.Context) (bool, error)
- func (u *Updater) FormulaExists(ctx context.Context, path string) (bool, error)
- func (u *Updater) GetFormula(ctx context.Context, path string) ([]byte, error)
- func (u *Updater) IsRepoEmpty(ctx context.Context) (bool, error)
- func (u *Updater) UpdateFormula(ctx context.Context, path string, content []byte, message string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater updates formulas in a Homebrew tap repository
func NewUpdater ¶
NewUpdater creates a new tap updater
func (*Updater) BranchExists ¶
BranchExists checks if the specified branch exists in the repository
func (*Updater) FormulaExists ¶
FormulaExists checks if a formula exists in the tap at the given repo path
func (*Updater) GetFormula ¶
GetFormula fetches the current formula content at the given repo path. Returns the file content or an error if the file doesn't exist.
func (*Updater) IsRepoEmpty ¶
IsRepoEmpty checks if the repository has any commits
func (*Updater) UpdateFormula ¶
func (u *Updater) UpdateFormula(ctx context.Context, path string, content []byte, message string) (string, error)
UpdateFormula creates or updates a formula file in the tap and returns the commit SHA. path is the file path within the repository (e.g. "Formula/myapp.rb"); content is the complete formula; message is the commit message.