builders

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: EUPL-1.2 Imports: 14 Imported by: 0

Documentation

Overview

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides project builders and reusable construction helpers for each supported project stack.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Package builders provides build implementations for different project types.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveBuilder

func ResolveBuilder(projectType build.ProjectType) core.Result

ResolveBuilder returns a concrete builder implementation for the project type.

result := builders.ResolveBuilder(build.ProjectTypeGo)
Example

ExampleResolveBuilder references ResolveBuilder on this package API surface.

_ = ResolveBuilder
core.Println("ResolveBuilder")
Output:
ResolveBuilder

func ValidateAppleOptions

func ValidateAppleOptions(options AppleOptions) core.Result

ValidateAppleOptions checks the minimum Apple pipeline option contract.

Example

ExampleValidateAppleOptions references ValidateAppleOptions on this package API surface.

_ = ValidateAppleOptions
core.Println("ValidateAppleOptions")
Output:
ValidateAppleOptions

func WriteAppleEntitlements

func WriteAppleEntitlements(filesystem coreio.Medium, path string, entitlements AppleEntitlements) core.Result

WriteAppleEntitlements writes a macOS entitlements plist.

Example

ExampleWriteAppleEntitlements references WriteAppleEntitlements on this package API surface.

_ = WriteAppleEntitlements
core.Println("WriteAppleEntitlements")
Output:
WriteAppleEntitlements

func WriteAppleInfoPlist

func WriteAppleInfoPlist(filesystem coreio.Medium, appPath string, cfg *build.Config, options AppleOptions, buildNumber string) core.Result

WriteAppleInfoPlist writes Contents/Info.plist for appPath.

Example

ExampleWriteAppleInfoPlist references WriteAppleInfoPlist on this package API surface.

_ = WriteAppleInfoPlist
core.Println("WriteAppleInfoPlist")
Output:
WriteAppleInfoPlist

Types

type AppleBuilder

type AppleBuilder struct {
	Options AppleOptions
	// contains filtered or unexported fields
}

AppleBuilder implements build.Builder for the Apple build pipeline skeleton.

func NewAppleBuilder

func NewAppleBuilder(options ...AppleBuilderOption) *AppleBuilder

NewAppleBuilder creates an Apple build pipeline skeleton.

Example

ExampleNewAppleBuilder references NewAppleBuilder on this package API surface.

_ = NewAppleBuilder
core.Println("NewAppleBuilder")
Output:
NewAppleBuilder

func (*AppleBuilder) Build

func (b *AppleBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build runs the Apple build pipeline skeleton.

Example

ExampleAppleBuilder_Build references AppleBuilder.Build on this package API surface.

_ = (*AppleBuilder).Build
core.Println("AppleBuilder.Build")
Output:
AppleBuilder.Build

func (*AppleBuilder) BuildWailsMacOS

func (b *AppleBuilder) BuildWailsMacOS(ctx context.Context, filesystem coreio.Medium, cfg *build.Config, outputDir, name, arch string) core.Result

BuildWailsMacOS records the Wails macOS build invocation and creates a placeholder .app bundle.

Example

ExampleAppleBuilder_BuildWailsMacOS references AppleBuilder.BuildWailsMacOS on this package API surface.

_ = (*AppleBuilder).BuildWailsMacOS
core.Println("AppleBuilder.BuildWailsMacOS")
Output:
AppleBuilder.BuildWailsMacOS

func (*AppleBuilder) CreateDMG

func (b *AppleBuilder) CreateDMG(ctx context.Context, filesystem coreio.Medium, appPath string, cfg AppleDMGConfig) core.Result

CreateDMG records the hdiutil DMG creation flow and writes a placeholder DMG.

Example

ExampleAppleBuilder_CreateDMG references AppleBuilder.CreateDMG on this package API surface.

_ = (*AppleBuilder).CreateDMG
core.Println("AppleBuilder.CreateDMG")
Output:
AppleBuilder.CreateDMG

func (*AppleBuilder) CreateUniversal

func (b *AppleBuilder) CreateUniversal(ctx context.Context, _ coreio.Medium, artifactFS coreio.Medium, arm64Path, amd64Path, outputPath, name string) core.Result

CreateUniversal records the lipo invocation and creates a placeholder universal .app bundle.

Example

ExampleAppleBuilder_CreateUniversal references AppleBuilder.CreateUniversal on this package API surface.

_ = (*AppleBuilder).CreateUniversal
core.Println("AppleBuilder.CreateUniversal")
Output:
AppleBuilder.CreateUniversal

func (*AppleBuilder) Detect

func (b *AppleBuilder) Detect(fs coreio.Medium, dir string) core.Result

Detect checks whether dir looks like a Wails macOS app project.

Example

ExampleAppleBuilder_Detect references AppleBuilder.Detect on this package API surface.

_ = (*AppleBuilder).Detect
core.Println("AppleBuilder.Detect")
Output:
AppleBuilder.Detect

func (*AppleBuilder) Name

func (b *AppleBuilder) Name() string

Name returns the builder identifier.

Example

ExampleAppleBuilder_Name references AppleBuilder.Name on this package API surface.

_ = (*AppleBuilder).Name
core.Println("AppleBuilder.Name")
Output:
AppleBuilder.Name

func (*AppleBuilder) Notarise

func (b *AppleBuilder) Notarise(ctx context.Context, artifactPath string, options AppleOptions) core.Result

Notarise records notarytool submit and stapler staple invocations. A real run requires Apple Developer credentials, either through a notarytool keychain profile, App Store Connect API key, or Apple ID credentials.

Example

ExampleAppleBuilder_Notarise references AppleBuilder.Notarise on this package API surface.

_ = (*AppleBuilder).Notarise
core.Println("AppleBuilder.Notarise")
Output:
AppleBuilder.Notarise

func (*AppleBuilder) WriteXcodeCloudConfig

func (b *AppleBuilder) WriteXcodeCloudConfig(filesystem coreio.Medium, projectDir string, cfg *build.Config, options AppleOptions) core.Result

WriteXcodeCloudConfig writes the AppleBuilder Xcode Cloud script templates.

Example

ExampleAppleBuilder_WriteXcodeCloudConfig references AppleBuilder.WriteXcodeCloudConfig on this package API surface.

_ = (*AppleBuilder).WriteXcodeCloudConfig
core.Println("AppleBuilder.WriteXcodeCloudConfig")
Output:
AppleBuilder.WriteXcodeCloudConfig

type AppleBuilderOption

type AppleBuilderOption func(*AppleBuilder)

AppleBuilderOption configures an AppleBuilder.

func WithAppleCommandRunner

func WithAppleCommandRunner(runner AppleCommandRunner) AppleBuilderOption

WithAppleCommandRunner configures the command runner used by external stubs.

Example

ExampleWithAppleCommandRunner references WithAppleCommandRunner on this package API surface.

_ = WithAppleCommandRunner
core.Println("WithAppleCommandRunner")
Output:
WithAppleCommandRunner

func WithAppleHostOS

func WithAppleHostOS(hostOS string) AppleBuilderOption

WithAppleHostOS overrides host OS detection, mainly for tests.

Example

ExampleWithAppleHostOS references WithAppleHostOS on this package API surface.

_ = WithAppleHostOS
core.Println("WithAppleHostOS")
Output:
WithAppleHostOS

func WithAppleOptions

func WithAppleOptions(options AppleOptions) AppleBuilderOption

WithAppleOptions replaces the default Apple options.

Example

ExampleWithAppleOptions references WithAppleOptions on this package API surface.

_ = WithAppleOptions
core.Println("WithAppleOptions")
Output:
WithAppleOptions

func WithAppleTODOWriter

func WithAppleTODOWriter(writer stdio.Writer) AppleBuilderOption

WithAppleTODOWriter configures where structured TODO messages are printed.

Example

ExampleWithAppleTODOWriter references WithAppleTODOWriter on this package API surface.

_ = WithAppleTODOWriter
core.Println("WithAppleTODOWriter")
Output:
WithAppleTODOWriter

type AppleCommandRunner

type AppleCommandRunner interface {
	Run(ctx context.Context, opts RunOptions) core.Result
}

AppleCommandRunner records or executes an external command invocation.

type AppleCommandRunnerFunc

type AppleCommandRunnerFunc func(ctx context.Context, opts RunOptions) core.Result

AppleCommandRunnerFunc adapts a function to AppleCommandRunner.

func (AppleCommandRunnerFunc) Run

func (fn AppleCommandRunnerFunc) Run(ctx context.Context, opts RunOptions) core.Result

Run implements AppleCommandRunner.

Example

ExampleAppleCommandRunnerFunc_Run references AppleCommandRunnerFunc.Run on this package API surface.

_ = (*AppleCommandRunnerFunc).Run
core.Println("AppleCommandRunnerFunc.Run")
Output:
AppleCommandRunnerFunc.Run

type AppleDMGConfig

type AppleDMGConfig struct {
	Enabled        bool
	OutputPath     string
	VolumeName     string
	BackgroundPath string
	IconSize       int
	WindowSize     [2]int
}

AppleDMGConfig holds DMG packaging settings for the Apple pipeline.

type AppleEntitlements

type AppleEntitlements struct {
	HardenedRuntime bool
	AppSandbox      bool
	NetworkClient   bool
}

AppleEntitlements contains the default macOS sandbox entitlements.

func DefaultAppleEntitlements

func DefaultAppleEntitlements() AppleEntitlements

DefaultAppleEntitlements returns the skeleton hardened runtime, sandbox, and network-client entitlements.

Example

ExampleDefaultAppleEntitlements references DefaultAppleEntitlements on this package API surface.

_ = DefaultAppleEntitlements
core.Println("DefaultAppleEntitlements")
Output:
DefaultAppleEntitlements

func (AppleEntitlements) Values

func (entitlements AppleEntitlements) Values() map[string]any

Values converts entitlements to Apple entitlement keys.

Example

ExampleAppleEntitlements_Values references AppleEntitlements.Values on this package API surface.

_ = (*AppleEntitlements).Values
core.Println("AppleEntitlements.Values")
Output:
AppleEntitlements.Values

type AppleInfoPlist

type AppleInfoPlist struct {
	BundleID          string
	BundleName        string
	BundleDisplayName string
	BundleVersion     string
	BuildNumber       string
	Executable        string
	MinSystemVersion  string
	Category          string
	Copyright         string
}

AppleInfoPlist contains the generated macOS app bundle metadata.

func GenerateAppleInfoPlist

func GenerateAppleInfoPlist(cfg *build.Config, options AppleOptions, buildNumber string) AppleInfoPlist

GenerateAppleInfoPlist creates Info.plist metadata from the build Config.

Example

ExampleGenerateAppleInfoPlist references GenerateAppleInfoPlist on this package API surface.

_ = GenerateAppleInfoPlist
core.Println("GenerateAppleInfoPlist")
Output:
GenerateAppleInfoPlist

func (AppleInfoPlist) Values

func (plist AppleInfoPlist) Values() map[string]any

Values converts the plist metadata to Apple Info.plist keys.

Example

ExampleAppleInfoPlist_Values references AppleInfoPlist.Values on this package API surface.

_ = (*AppleInfoPlist).Values
core.Println("AppleInfoPlist.Values")
Output:
AppleInfoPlist.Values

type AppleNotariseConfig

type AppleNotariseConfig struct {
	AppPath        string
	Profile        string
	APIKeyID       string
	APIKeyIssuerID string
	APIKeyPath     string
	TeamID         string
	AppleID        string
	Password       string
}

AppleNotariseConfig defines a notarisation request for a built Apple artifact.

type AppleOptions

type AppleOptions struct {
	SigningIdentity  string
	CertIdentity     string
	BundleID         string
	EntitlementsPath string

	Arch              string
	BundleDisplayName string
	MinSystemVersion  string
	Category          string
	Copyright         string
	BuildNumber       string

	Sign       bool
	Notarise   bool
	Notarize   bool
	TestFlight bool
	AppStore   bool

	TeamID      string
	AppleID     string
	AppPassword string
	Password    string

	APIKeyID       string
	APIKeyIssuerID string
	APIKeyPath     string

	NotarisationProfile string
	NotarizationProfile string
	NotaryProfile       string

	TestFlightKeyID      string
	TestFlightIssuerID   string
	TestFlightKeyPath    string
	TestFlightPrivateKey string
	XcodeCloud           bool
	DMG                  AppleDMGConfig
}

AppleOptions holds the Apple build pipeline settings used by AppleBuilder.

func DefaultAppleBuilderOptions

func DefaultAppleBuilderOptions() AppleOptions

DefaultAppleBuilderOptions returns sandbox-safe Apple pipeline defaults.

Example

ExampleDefaultAppleBuilderOptions references DefaultAppleBuilderOptions on this package API surface.

_ = DefaultAppleBuilderOptions
core.Println("DefaultAppleBuilderOptions")
Output:
DefaultAppleBuilderOptions

type Builder

type Builder = build.Builder

Builder aliases the shared build.Builder interface for callers in this package.

type CPPBuilder

type CPPBuilder struct{}

CPPBuilder implements the Builder interface for C++ projects using CMake + Conan. It wraps the Makefile-based build system from the .core/build submodule.

b := builders.NewCPPBuilder()

func NewCPPBuilder

func NewCPPBuilder() *CPPBuilder

NewCPPBuilder creates a new CPPBuilder instance.

b := builders.NewCPPBuilder()

Example

ExampleNewCPPBuilder references NewCPPBuilder on this package API surface.

_ = NewCPPBuilder
core.Println("NewCPPBuilder")
Output:
NewCPPBuilder

func (*CPPBuilder) Build

func (b *CPPBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build compiles the C++ project using Make targets. The build flow is: make configure → make build → make package.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleCPPBuilder_Build references CPPBuilder.Build on this package API surface.

_ = (*CPPBuilder).Build
core.Println("CPPBuilder.Build")
Output:
CPPBuilder.Build

func (*CPPBuilder) Detect

func (b *CPPBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project (checks for CMakeLists.txt).

ok, err := b.Detect(storage.Local, ".")

Example

ExampleCPPBuilder_Detect references CPPBuilder.Detect on this package API surface.

_ = (*CPPBuilder).Detect
core.Println("CPPBuilder.Detect")
Output:
CPPBuilder.Detect

func (*CPPBuilder) Name

func (b *CPPBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "cpp"

Example

ExampleCPPBuilder_Name references CPPBuilder.Name on this package API surface.

_ = (*CPPBuilder).Name
core.Println("CPPBuilder.Name")
Output:
CPPBuilder.Name

type DMGConfig

type DMGConfig = AppleDMGConfig

DMGConfig aliases the Apple DMG config for callers that use the shorter name.

type DockerBuilder

type DockerBuilder struct{}

DockerBuilder builds Docker images.

b := builders.NewDockerBuilder()

func NewDockerBuilder

func NewDockerBuilder() *DockerBuilder

NewDockerBuilder creates a new Docker builder.

b := builders.NewDockerBuilder()

Example

ExampleNewDockerBuilder references NewDockerBuilder on this package API surface.

_ = NewDockerBuilder
core.Println("NewDockerBuilder")
Output:
NewDockerBuilder

func (*DockerBuilder) Build

func (b *DockerBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build builds Docker images for the specified targets.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleDockerBuilder_Build references DockerBuilder.Build on this package API surface.

_ = (*DockerBuilder).Build
core.Println("DockerBuilder.Build")
Output:
DockerBuilder.Build

func (*DockerBuilder) Detect

func (b *DockerBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if a Dockerfile or Containerfile exists in the directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExampleDockerBuilder_Detect references DockerBuilder.Detect on this package API surface.

_ = (*DockerBuilder).Detect
core.Println("DockerBuilder.Detect")
Output:
DockerBuilder.Detect

func (*DockerBuilder) Name

func (b *DockerBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "docker"

Example

ExampleDockerBuilder_Name references DockerBuilder.Name on this package API surface.

_ = (*DockerBuilder).Name
core.Println("DockerBuilder.Name")
Output:
DockerBuilder.Name

type DocsBuilder

type DocsBuilder struct{}

DocsBuilder builds MkDocs projects.

b := builders.NewDocsBuilder()

func NewDocsBuilder

func NewDocsBuilder() *DocsBuilder

NewDocsBuilder creates a new DocsBuilder instance.

b := builders.NewDocsBuilder()

Example

ExampleNewDocsBuilder references NewDocsBuilder on this package API surface.

_ = NewDocsBuilder
core.Println("NewDocsBuilder")
Output:
NewDocsBuilder

func (*DocsBuilder) Build

func (b *DocsBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build runs mkdocs build and packages the generated site into a zip archive.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleDocsBuilder_Build references DocsBuilder.Build on this package API surface.

_ = (*DocsBuilder).Build
core.Println("DocsBuilder.Build")
Output:
DocsBuilder.Build

func (*DocsBuilder) Detect

func (b *DocsBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project in the given directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExampleDocsBuilder_Detect references DocsBuilder.Detect on this package API surface.

_ = (*DocsBuilder).Detect
core.Println("DocsBuilder.Detect")
Output:
DocsBuilder.Detect

func (*DocsBuilder) Name

func (b *DocsBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "docs"

Example

ExampleDocsBuilder_Name references DocsBuilder.Name on this package API surface.

_ = (*DocsBuilder).Name
core.Println("DocsBuilder.Name")
Output:
DocsBuilder.Name

type GoBuilder

type GoBuilder struct{}

GoBuilder implements the Builder interface for Go projects.

b := builders.NewGoBuilder()

func NewGoBuilder

func NewGoBuilder() *GoBuilder

NewGoBuilder creates a new GoBuilder instance.

b := builders.NewGoBuilder()

Example

ExampleNewGoBuilder references NewGoBuilder on this package API surface.

_ = NewGoBuilder
core.Println("NewGoBuilder")
Output:
NewGoBuilder

func (*GoBuilder) Build

func (b *GoBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build compiles the Go project for the specified targets. If targets is empty, it falls back to the current host platform. It sets GOOS, GOARCH, and CGO_ENABLED, applies config-defined build flags and ldflags, and uses garble when obfuscation is enabled.

result := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleGoBuilder_Build references GoBuilder.Build on this package API surface.

_ = (*GoBuilder).Build
core.Println("GoBuilder.Build")
Output:
GoBuilder.Build

func (*GoBuilder) Detect

func (b *GoBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project in the given directory. Uses IsGoProject from the build package which checks for go.mod, go.work, or wails.json.

result := b.Detect(storage.Local, ".")

Example

ExampleGoBuilder_Detect references GoBuilder.Detect on this package API surface.

_ = (*GoBuilder).Detect
core.Println("GoBuilder.Detect")
Output:
GoBuilder.Detect

func (*GoBuilder) Name

func (b *GoBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "go"

Example

ExampleGoBuilder_Name references GoBuilder.Name on this package API surface.

_ = (*GoBuilder).Name
core.Println("GoBuilder.Name")
Output:
GoBuilder.Name

type GoProcessAppleRunner

type GoProcessAppleRunner struct{}

GoProcessAppleRunner executes commands through Core's process primitive. It is intentionally opt-in because the skeleton defaults to non-executing stubs for sandbox-safe tests.

func (GoProcessAppleRunner) Run

func (GoProcessAppleRunner) Run(ctx context.Context, opts RunOptions) core.Result

Run executes opts through Core's process primitive.

Example

ExampleGoProcessAppleRunner_Run references GoProcessAppleRunner.Run on this package API surface.

_ = (*GoProcessAppleRunner).Run
core.Println("GoProcessAppleRunner.Run")
Output:
GoProcessAppleRunner.Run

type LinuxKitBuilder

type LinuxKitBuilder struct{}

LinuxKitBuilder builds LinuxKit images.

b := builders.NewLinuxKitBuilder()

func NewLinuxKitBuilder

func NewLinuxKitBuilder() *LinuxKitBuilder

NewLinuxKitBuilder creates a new LinuxKit builder.

b := builders.NewLinuxKitBuilder()

Example

ExampleNewLinuxKitBuilder references NewLinuxKitBuilder on this package API surface.

_ = NewLinuxKitBuilder
core.Println("NewLinuxKitBuilder")
Output:
NewLinuxKitBuilder

func (*LinuxKitBuilder) Build

func (b *LinuxKitBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build builds LinuxKit images for the specified targets.

result := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleLinuxKitBuilder_Build references LinuxKitBuilder.Build on this package API surface.

_ = (*LinuxKitBuilder).Build
core.Println("LinuxKitBuilder.Build")
Output:
LinuxKitBuilder.Build

func (*LinuxKitBuilder) Detect

func (b *LinuxKitBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if a linuxkit.yml, linuxkit.yaml, or nested YAML config exists in the directory.

result := b.Detect(storage.Local, ".")

Example

ExampleLinuxKitBuilder_Detect references LinuxKitBuilder.Detect on this package API surface.

_ = (*LinuxKitBuilder).Detect
core.Println("LinuxKitBuilder.Detect")
Output:
LinuxKitBuilder.Detect

func (*LinuxKitBuilder) Name

func (b *LinuxKitBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "linuxkit"

Example

ExampleLinuxKitBuilder_Name references LinuxKitBuilder.Name on this package API surface.

_ = (*LinuxKitBuilder).Name
core.Println("LinuxKitBuilder.Name")
Output:
LinuxKitBuilder.Name

type LinuxKitImageBuilder

type LinuxKitImageBuilder struct{}

LinuxKitImageBuilder renders and builds immutable LinuxKit base images.

func NewLinuxKitImageBuilder

func NewLinuxKitImageBuilder() *LinuxKitImageBuilder

NewLinuxKitImageBuilder creates an immutable LinuxKit image builder.

Example

ExampleNewLinuxKitImageBuilder references NewLinuxKitImageBuilder on this package API surface.

_ = NewLinuxKitImageBuilder
core.Println("NewLinuxKitImageBuilder")
Output:
NewLinuxKitImageBuilder

func (*LinuxKitImageBuilder) ArtifactPath

func (b *LinuxKitImageBuilder) ArtifactPath(outputDir, name, format string) string

ArtifactPath returns the final output path for a requested immutable image format.

Example

ExampleLinuxKitImageBuilder_ArtifactPath references LinuxKitImageBuilder.ArtifactPath on this package API surface.

_ = (*LinuxKitImageBuilder).ArtifactPath
core.Println("LinuxKitImageBuilder.ArtifactPath")
Output:
LinuxKitImageBuilder.ArtifactPath

func (*LinuxKitImageBuilder) Build

func (b *LinuxKitImageBuilder) Build(ctx context.Context, cfg *build.Config) core.Result

Build renders the embedded LinuxKit template and emits one artifact per format.

Example

ExampleLinuxKitImageBuilder_Build references LinuxKitImageBuilder.Build on this package API surface.

_ = (*LinuxKitImageBuilder).Build
core.Println("LinuxKitImageBuilder.Build")
Output:
LinuxKitImageBuilder.Build

func (*LinuxKitImageBuilder) ListBaseImages

func (b *LinuxKitImageBuilder) ListBaseImages() []build.LinuxKitBaseImage

ListBaseImages returns the built-in immutable LinuxKit base images.

Example

ExampleLinuxKitImageBuilder_ListBaseImages references LinuxKitImageBuilder.ListBaseImages on this package API surface.

_ = (*LinuxKitImageBuilder).ListBaseImages
core.Println("LinuxKitImageBuilder.ListBaseImages")
Output:
LinuxKitImageBuilder.ListBaseImages

func (*LinuxKitImageBuilder) Name

func (b *LinuxKitImageBuilder) Name() string

Name returns the builder identifier.

Example

ExampleLinuxKitImageBuilder_Name references LinuxKitImageBuilder.Name on this package API surface.

_ = (*LinuxKitImageBuilder).Name
core.Println("LinuxKitImageBuilder.Name")
Output:
LinuxKitImageBuilder.Name

type LinuxKitImageTemplateData

type LinuxKitImageTemplateData struct {
	Name              string
	Description       string
	Version           string
	GPU               bool
	Mounts            []string
	ServiceImage      string
	EntrypointCommand string
}

LinuxKitImageTemplateData is the template input for embedded immutable image definitions.

type NodeBuilder

type NodeBuilder struct{}

NodeBuilder builds Node.js projects with the detected package manager.

b := builders.NewNodeBuilder()

func NewNodeBuilder

func NewNodeBuilder() *NodeBuilder

NewNodeBuilder creates a new NodeBuilder instance.

b := builders.NewNodeBuilder()

Example

ExampleNewNodeBuilder references NewNodeBuilder on this package API surface.

_ = NewNodeBuilder
core.Println("NewNodeBuilder")
Output:
NewNodeBuilder

func (*NodeBuilder) Build

func (b *NodeBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build runs the project build script once per target and collects artifacts from the target-specific output directory.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleNodeBuilder_Build references NodeBuilder.Build on this package API surface.

_ = (*NodeBuilder).Build
core.Println("NodeBuilder.Build")
Output:
NodeBuilder.Build

func (*NodeBuilder) Detect

func (b *NodeBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project in the given directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExampleNodeBuilder_Detect references NodeBuilder.Detect on this package API surface.

_ = (*NodeBuilder).Detect
core.Println("NodeBuilder.Detect")
Output:
NodeBuilder.Detect

func (*NodeBuilder) Name

func (b *NodeBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "node"

Example

ExampleNodeBuilder_Name references NodeBuilder.Name on this package API surface.

_ = (*NodeBuilder).Name
core.Println("NodeBuilder.Name")
Output:
NodeBuilder.Name

type PHPBuilder

type PHPBuilder struct{}

PHPBuilder builds PHP projects with composer.json manifests.

b := builders.NewPHPBuilder()

func NewPHPBuilder

func NewPHPBuilder() *PHPBuilder

NewPHPBuilder creates a new PHP builder instance.

b := builders.NewPHPBuilder()

Example

ExampleNewPHPBuilder references NewPHPBuilder on this package API surface.

_ = NewPHPBuilder
core.Println("NewPHPBuilder")
Output:
NewPHPBuilder

func (*PHPBuilder) Build

func (b *PHPBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build installs dependencies and produces either composer-generated artifacts or a deterministic bundle when the project does not emit build outputs.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExamplePHPBuilder_Build references PHPBuilder.Build on this package API surface.

_ = (*PHPBuilder).Build
core.Println("PHPBuilder.Build")
Output:
PHPBuilder.Build

func (*PHPBuilder) Detect

func (b *PHPBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project in the given directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExamplePHPBuilder_Detect references PHPBuilder.Detect on this package API surface.

_ = (*PHPBuilder).Detect
core.Println("PHPBuilder.Detect")
Output:
PHPBuilder.Detect

func (*PHPBuilder) Name

func (b *PHPBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "php"

Example

ExamplePHPBuilder_Name references PHPBuilder.Name on this package API surface.

_ = (*PHPBuilder).Name
core.Println("PHPBuilder.Name")
Output:
PHPBuilder.Name

type PythonBuilder

type PythonBuilder struct{}

PythonBuilder builds Python projects with pyproject.toml or requirements.txt markers.

b := builders.NewPythonBuilder()

func NewPythonBuilder

func NewPythonBuilder() *PythonBuilder

NewPythonBuilder creates a new PythonBuilder instance.

b := builders.NewPythonBuilder()

Example

ExampleNewPythonBuilder references NewPythonBuilder on this package API surface.

_ = NewPythonBuilder
core.Println("NewPythonBuilder")
Output:
NewPythonBuilder

func (*PythonBuilder) Build

func (b *PythonBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build packages the Python project into a deterministic zip bundle per target.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExamplePythonBuilder_Build references PythonBuilder.Build on this package API surface.

_ = (*PythonBuilder).Build
core.Println("PythonBuilder.Build")
Output:
PythonBuilder.Build

func (*PythonBuilder) Detect

func (b *PythonBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project in the given directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExamplePythonBuilder_Detect references PythonBuilder.Detect on this package API surface.

_ = (*PythonBuilder).Detect
core.Println("PythonBuilder.Detect")
Output:
PythonBuilder.Detect

func (*PythonBuilder) Name

func (b *PythonBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "python"

Example

ExamplePythonBuilder_Name references PythonBuilder.Name on this package API surface.

_ = (*PythonBuilder).Name
core.Println("PythonBuilder.Name")
Output:
PythonBuilder.Name

type RunOptions

type RunOptions struct {
	Command string
	Args    []string
	Dir     string
	Env     []string
}

RunOptions describes an external command invocation for the Apple pipeline: the executable, its arguments, the working directory, and environment overrides. The pipeline records these (see printTODO) for sandbox-safe tests and executes them through Core's process primitive on a real macOS runner.

type RustBuilder

type RustBuilder struct{}

RustBuilder implements the Builder interface for Rust projects.

b := builders.NewRustBuilder()

func NewRustBuilder

func NewRustBuilder() *RustBuilder

NewRustBuilder creates a new RustBuilder instance.

b := builders.NewRustBuilder()

Example

ExampleNewRustBuilder references NewRustBuilder on this package API surface.

_ = NewRustBuilder
core.Println("NewRustBuilder")
Output:
NewRustBuilder

func (*RustBuilder) Build

func (b *RustBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build compiles the Rust project for the specified targets.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleRustBuilder_Build references RustBuilder.Build on this package API surface.

_ = (*RustBuilder).Build
core.Println("RustBuilder.Build")
Output:
RustBuilder.Build

func (*RustBuilder) Detect

func (b *RustBuilder) Detect(filesystem storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project in the given directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExampleRustBuilder_Detect references RustBuilder.Detect on this package API surface.

_ = (*RustBuilder).Detect
core.Println("RustBuilder.Detect")
Output:
RustBuilder.Detect

func (*RustBuilder) Name

func (b *RustBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "rust"

Example

ExampleRustBuilder_Name references RustBuilder.Name on this package API surface.

_ = (*RustBuilder).Name
core.Println("RustBuilder.Name")
Output:
RustBuilder.Name

type TaskfileBuilder

type TaskfileBuilder struct{}

TaskfileBuilder builds projects using Taskfile (https://taskfile.dev/). This is a generic builder that can handle any project type that has a Taskfile.

b := builders.NewTaskfileBuilder()

func NewTaskfileBuilder

func NewTaskfileBuilder() *TaskfileBuilder

NewTaskfileBuilder creates a new Taskfile builder.

b := builders.NewTaskfileBuilder()

Example

ExampleNewTaskfileBuilder references NewTaskfileBuilder on this package API surface.

_ = NewTaskfileBuilder
core.Println("NewTaskfileBuilder")
Output:
NewTaskfileBuilder

func (*TaskfileBuilder) Build

func (b *TaskfileBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build runs the Taskfile build task for each target platform.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "linux", Arch: "amd64"}})

Example

ExampleTaskfileBuilder_Build references TaskfileBuilder.Build on this package API surface.

_ = (*TaskfileBuilder).Build
core.Println("TaskfileBuilder.Build")
Output:
TaskfileBuilder.Build

func (*TaskfileBuilder) Detect

func (b *TaskfileBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if a Taskfile exists in the directory.

ok, err := b.Detect(storage.Local, ".")

Example

ExampleTaskfileBuilder_Detect references TaskfileBuilder.Detect on this package API surface.

_ = (*TaskfileBuilder).Detect
core.Println("TaskfileBuilder.Detect")
Output:
TaskfileBuilder.Detect

func (*TaskfileBuilder) Name

func (b *TaskfileBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "taskfile"

Example

ExampleTaskfileBuilder_Name references TaskfileBuilder.Name on this package API surface.

_ = (*TaskfileBuilder).Name
core.Println("TaskfileBuilder.Name")
Output:
TaskfileBuilder.Name

type WailsBuilder

type WailsBuilder struct{}

WailsBuilder implements the Builder interface for Wails v3 projects.

b := builders.NewWailsBuilder()

func NewWailsBuilder

func NewWailsBuilder() *WailsBuilder

NewWailsBuilder creates a new WailsBuilder instance.

b := builders.NewWailsBuilder()

Example

ExampleNewWailsBuilder references NewWailsBuilder on this package API surface.

_ = NewWailsBuilder
core.Println("NewWailsBuilder")
Output:
NewWailsBuilder

func (*WailsBuilder) Build

func (b *WailsBuilder) Build(ctx context.Context, cfg *build.Config, targets []build.Target) core.Result

Build compiles the Wails project for the specified targets. Wails v3: delegates to Taskfile; Wails v2: uses 'wails build'.

artifacts, err := b.Build(ctx, cfg, []build.Target{{OS: "darwin", Arch: "arm64"}})

Example

ExampleWailsBuilder_Build references WailsBuilder.Build on this package API surface.

_ = (*WailsBuilder).Build
core.Println("WailsBuilder.Build")
Output:
WailsBuilder.Build

func (*WailsBuilder) Detect

func (b *WailsBuilder) Detect(fs storage.Medium, dir string) core.Result

Detect checks if this builder can handle the project (checks for wails.json).

ok, err := b.Detect(storage.Local, ".")

Example

ExampleWailsBuilder_Detect references WailsBuilder.Detect on this package API surface.

_ = (*WailsBuilder).Detect
core.Println("WailsBuilder.Detect")
Output:
WailsBuilder.Detect

func (*WailsBuilder) Name

func (b *WailsBuilder) Name() string

Name returns the builder's identifier.

name := b.Name() // → "wails"

Example

ExampleWailsBuilder_Name references WailsBuilder.Name on this package API surface.

_ = (*WailsBuilder).Name
core.Println("WailsBuilder.Name")
Output:
WailsBuilder.Name

func (*WailsBuilder) PreBuild

func (b *WailsBuilder) PreBuild(ctx context.Context, cfg *build.Config) core.Result

PreBuild runs the frontend build step before Wails compiles the desktop app.

err := b.PreBuild(ctx, cfg) // runs `deno task build` or `npm run build`

Example

ExampleWailsBuilder_PreBuild references WailsBuilder.PreBuild on this package API surface.

_ = (*WailsBuilder).PreBuild
core.Println("WailsBuilder.PreBuild")
Output:
WailsBuilder.PreBuild

Jump to

Keyboard shortcuts

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