builders

package
v0.0.4-alpha.21 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: EUPL-1.2 Imports: 8 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerBuilder

type DockerBuilder struct{}

DockerBuilder builds Docker images.

func NewDockerBuilder

func NewDockerBuilder() *DockerBuilder

NewDockerBuilder creates a new Docker builder.

func (*DockerBuilder) Build

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

Build builds Docker images for the specified targets.

func (*DockerBuilder) Detect

func (b *DockerBuilder) Detect(fs io.Medium, dir string) (bool, error)

Detect checks if a Dockerfile exists in the directory.

func (*DockerBuilder) Name

func (b *DockerBuilder) Name() string

Name returns the builder's identifier.

type GoBuilder

type GoBuilder struct{}

GoBuilder implements the Builder interface for Go projects.

func NewGoBuilder

func NewGoBuilder() *GoBuilder

NewGoBuilder creates a new GoBuilder instance.

func (*GoBuilder) Build

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

Build compiles the Go project for the specified targets. It sets GOOS, GOARCH, and CGO_ENABLED environment variables, applies ldflags and trimpath, and runs go build.

func (*GoBuilder) Detect

func (b *GoBuilder) Detect(fs io.Medium, dir string) (bool, error)

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

func (*GoBuilder) Name

func (b *GoBuilder) Name() string

Name returns the builder's identifier.

type LinuxKitBuilder

type LinuxKitBuilder struct{}

LinuxKitBuilder builds LinuxKit images.

func NewLinuxKitBuilder

func NewLinuxKitBuilder() *LinuxKitBuilder

NewLinuxKitBuilder creates a new LinuxKit builder.

func (*LinuxKitBuilder) Build

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

Build builds LinuxKit images for the specified targets.

func (*LinuxKitBuilder) Detect

func (b *LinuxKitBuilder) Detect(fs io.Medium, dir string) (bool, error)

Detect checks if a linuxkit.yml or .yml config exists in the directory.

func (*LinuxKitBuilder) Name

func (b *LinuxKitBuilder) Name() string

Name returns the builder's identifier.

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.

func NewTaskfileBuilder

func NewTaskfileBuilder() *TaskfileBuilder

NewTaskfileBuilder creates a new Taskfile builder.

func (*TaskfileBuilder) Build

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

Build runs the Taskfile build task for each target platform.

func (*TaskfileBuilder) Detect

func (b *TaskfileBuilder) Detect(fs io.Medium, dir string) (bool, error)

Detect checks if a Taskfile exists in the directory.

func (*TaskfileBuilder) Name

func (b *TaskfileBuilder) Name() string

Name returns the builder's identifier.

type WailsBuilder

type WailsBuilder struct{}

WailsBuilder implements the Builder interface for Wails v3 projects.

func NewWailsBuilder

func NewWailsBuilder() *WailsBuilder

NewWailsBuilder creates a new WailsBuilder instance.

func (*WailsBuilder) Build

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

Build compiles the Wails project for the specified targets. It detects the Wails version and chooses the appropriate build strategy: - Wails v3: Delegates to Taskfile (error if missing) - Wails v2: Uses 'wails build' command

func (*WailsBuilder) Detect

func (b *WailsBuilder) Detect(fs io.Medium, dir string) (bool, error)

Detect checks if this builder can handle the project in the given directory. Uses IsWailsProject from the build package which checks for wails.json.

func (*WailsBuilder) Name

func (b *WailsBuilder) Name() string

Name returns the builder's identifier.

Jump to

Keyboard shortcuts

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