buildout

package
v0.0.0-...-fc3ad6d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildPlan

type BuildPlan struct {
	ManifestPath string      `json:"manifest_path"`
	Manifest     Manifest    `json:"manifest"`
	Target       Target      `json:"target"`
	BuildTarget  string      `json:"build_target"`
	ArtifactRoot string      `json:"artifact_root"`
	CreatedAt    string      `json:"created_at"`
	Slice        ExportSlice `json:"slice,omitempty"`
	Notes        []string    `json:"notes,omitempty"`
}

BuildPlan captures what bo is asked to export.

type BuildResult

type BuildResult struct {
	ManifestPath string   `json:"manifest_path"`
	Manifest     Manifest `json:"manifest"`
	Target       Target   `json:"target"`
	BuildTarget  string   `json:"build_target"`
	Status       string   `json:"status"`
	Message      string   `json:"message"`
	OutputPath   string   `json:"output_path,omitempty"`
	BundlePath   string   `json:"bundle_path,omitempty"`
	SlicePath    string   `json:"slice_path,omitempty"`
	Artifacts    []string `json:"artifacts,omitempty"`
}

BuildResult describes the output generated by bo.

type Builder

type Builder struct {
	GoBin   string
	DistDir string
	DryRun  bool
	Stdout  io.Writer
	Stderr  io.Writer
}

Builder executes build-out exports from a manifest.

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a builder with sensible defaults.

func (*Builder) Build

func (b *Builder) Build(manifestPath string, target Target) (BuildResult, error)

Build exports the requested target from a manifest.

type ExportSlice

type ExportSlice struct {
	ManifestPath string         `json:"manifestPath,omitempty"`
	ModuleRoot   string         `json:"moduleRoot,omitempty"`
	Name         string         `json:"name"`
	Mode         string         `json:"mode,omitempty"`
	Routes       []string       `json:"routes,omitempty"`
	Folders      []string       `json:"folders,omitempty"`
	Assets       []string       `json:"assets,omitempty"`
	Include      []string       `json:"include,omitempty"`
	Files        []ResolvedFile `json:"files,omitempty"`
}

ExportSlice captures the inspectable scope of an export.

type Manifest

type Manifest struct {
	Name        string            `json:"name"`
	Mode        string            `json:"mode,omitempty"`
	Output      string            `json:"output"`
	Module      string            `json:"module"`
	Entrypoint  string            `json:"entrypoint"`
	BaseDir     string            `json:"baseDir,omitempty"`
	AgentsDir   string            `json:"agentsDir,omitempty"`
	Runtime     string            `json:"runtime,omitempty"`
	Description string            `json:"description,omitempty"`
	Pages       []string          `json:"pages,omitempty"`
	Paths       []string          `json:"paths,omitempty"`
	Folders     []string          `json:"folders,omitempty"`
	Include     []string          `json:"include,omitempty"`
	Assets      []string          `json:"assets,omitempty"`
	Slices      []PackSlice       `json:"slices,omitempty"`
	Bundles     []PackBundle      `json:"bundles,omitempty"`
	Environment map[string]string `json:"environment,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
	Bundle      bool              `json:"bundle,omitempty"`
}

Manifest describes the scope of an export.

func LoadManifest

func LoadManifest(path string) (Manifest, error)

LoadManifest reads and parses a BO pack file from disk.

func ParsePack

func ParsePack(source string) (Manifest, error)

ParsePack parses the textual BO pack format into a Manifest.

func (Manifest) BinaryName

func (m Manifest) BinaryName() string

BinaryName returns the output file name for the host platform.

func (Manifest) BuildTarget

func (m Manifest) BuildTarget() string

BuildTarget resolves the package path that go build should compile.

func (*Manifest) Normalize

func (m *Manifest) Normalize(sourcePath string)

Normalize fills defaults that are safe to infer.

func (Manifest) PackString

func (m Manifest) PackString() string

PackString renders the pack as a stable textual manifest.

func (Manifest) Plan

func (m Manifest) Plan(path string, target Target, distDir string) BuildPlan

Plan creates a normalized build plan for the manifest.

func (Manifest) PlannedOutputDir

func (m Manifest) PlannedOutputDir(distDir string) string

PlannedOutputDir returns the build root for the manifest.

func (Manifest) ResolveSlice

func (m Manifest) ResolveSlice(moduleRoot string) (ExportSlice, error)

ResolveSlice resolves route hints and filesystem selections into an export slice.

func (Manifest) Validate

func (m Manifest) Validate() error

Validate makes sure the manifest has the minimum export contract.

func (Manifest) Write

func (m Manifest) Write(path string) error

Write serializes the manifest back to a pack file.

type PackBundle

type PackBundle struct {
	Slice  string `json:"slice,omitempty"`
	Target Target `json:"target"`
}

PackBundle describes a bundle directive declared inside a pack file.

type PackSlice

type PackSlice struct {
	Path    string `json:"path"`
	Default bool   `json:"default,omitempty"`
	Label   string `json:"label,omitempty"`
}

PackSlice describes a slice declared inside a pack file.

type ResolvedFile

type ResolvedFile struct {
	Path         string `json:"path"`
	RelativePath string `json:"relativePath"`
	Kind         string `json:"kind"`
	Size         int64  `json:"size,omitempty"`
}

ResolvedFile represents a file included in a BO export slice.

type Target

type Target string

Target represents the packaging format requested by bo.

const (
	TargetEXE Target = "exe"
	TargetAPK Target = "apk"
	TargetIPA Target = "ipa"
	TargetDMG Target = "dmg"
	TargetGOE Target = "goe"
)

func ParseTarget

func ParseTarget(raw string) (Target, error)

ParseTarget normalizes the requested format.

Jump to

Keyboard shortcuts

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