tap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

func NewUpdater(token, owner, repo, branch string) *Updater

NewUpdater creates a new tap updater

func (*Updater) BranchExists

func (u *Updater) BranchExists(ctx context.Context) (bool, error)

BranchExists checks if the specified branch exists in the repository

func (*Updater) FormulaExists

func (u *Updater) FormulaExists(ctx context.Context, path string) (bool, error)

FormulaExists checks if a formula exists in the tap at the given repo path

func (*Updater) GetFormula

func (u *Updater) GetFormula(ctx context.Context, path string) ([]byte, error)

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

func (u *Updater) IsRepoEmpty(ctx context.Context) (bool, error)

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.

Jump to

Keyboard shortcuts

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