build

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package build provides build coordination for remote iOS builds via GitHub Actions. It handles triggering workflows, monitoring progress, and downloading artifacts.

Index

Constants

View Source
const (
	// DefaultTimeout is the default build timeout
	DefaultTimeout = 30 * time.Minute

	// WorkflowFile is the name of the workflow file
	WorkflowFile = "ios-build.yml"

	// IPAArtifactName is the name of the IPA artifact uploaded by the workflow
	IPAArtifactName = "ipa"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildOptions

type BuildOptions struct {
	OutputDir string
	Timeout   time.Duration
	Unsigned  bool // Skip code signing even if configured
}

BuildOptions contains options for a build

type BuildResult

type BuildResult struct {
	BuildID     string
	IPAPath     string
	Duration    time.Duration
	WorkflowURL string
	IPASize     int64
}

BuildResult contains the result of a build

type Coordinator

type Coordinator struct {
	// contains filtered or unexported fields
}

Coordinator orchestrates the build process

func NewCoordinator

func NewCoordinator(cfg *config.Config, gh *github.Client) *Coordinator

NewCoordinator creates a new build coordinator

func (*Coordinator) Build

func (c *Coordinator) Build(ctx context.Context, opts BuildOptions) (*BuildResult, error)

Build triggers a remote build and downloads the IPA artifact

type Phase

type Phase string

Phase represents a build phase

const (
	PhaseTriggering   Phase = "trigger"
	PhaseWaitingStart Phase = "waiting"
	PhaseBuilding     Phase = "building"
	PhaseDownloading  Phase = "download"
)

type PhaseInfo

type PhaseInfo struct {
	Name   string
	Icon   string
	Status string
}

PhaseInfo contains information about a phase

type Progress

type Progress struct {
	// contains filtered or unexported fields
}

Progress tracks and displays build progress

func NewProgress

func NewProgress(w io.Writer) *Progress

NewProgress creates a new progress reporter

func (*Progress) Complete

func (p *Progress) Complete(phase Phase, message string)

Complete marks a phase as complete

func (*Progress) Error

func (p *Progress) Error(phase Phase, err error)

Error marks a phase as failed

func (*Progress) Finish

func (p *Progress) Finish()

Finish completes progress tracking

func (*Progress) SetWorkflowURL

func (p *Progress) SetWorkflowURL(url string)

SetWorkflowURL sets the workflow URL for error messages

func (*Progress) Start

func (p *Progress) Start(buildID string)

Start begins progress tracking for a build

func (*Progress) Update

func (p *Progress) Update(phase Phase, message string)

Update updates the current phase with a message

func (*Progress) UpdateDownloadProgress

func (p *Progress) UpdateDownloadProgress(downloaded, total int64)

UpdateDownloadProgress updates the download progress display

Jump to

Keyboard shortcuts

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