builder

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package builder implements launchr functionality to build itself.

Package builder implements a plugin to build launchr with plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, flags *builderInput) error

Execute runs launchr and executes build of launchr.

Types

type BuildOptions

type BuildOptions struct {
	AppVersion  *launchr.AppVersion
	Version     string
	CorePkg     UsePluginInfo
	PkgName     string
	ModReplace  map[string]string
	Plugins     []UsePluginInfo
	BuildOutput string
	Debug       bool
	Tags        []string
	NoCache     bool
}

BuildOptions stores launchr build parameters.

func (*BuildOptions) Validate

func (opts *BuildOptions) Validate() error

Validate verifies build options.

type Builder

type Builder struct {
	action.WithLogger
	action.WithTerm

	*BuildOptions
	// contains filtered or unexported fields
}

Builder is the orchestrator to fetch dependencies and build launchr.

func NewBuilder

func NewBuilder(opts *BuildOptions) (*Builder, error)

NewBuilder creates a build environment.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) error

Build prepares build environment, generates go files and build the binary.

func (*Builder) Close

func (b *Builder) Close() error

Close does cleanup after build.

type Plugin

type Plugin struct{}

Plugin is a launchr.Plugin to build launchr application.

func (*Plugin) DiscoverActions added in v0.17.1

func (p *Plugin) DiscoverActions(_ context.Context) ([]*action.Action, error)

DiscoverActions implements launchr.ActionDiscoveryPlugin interface.

func (*Plugin) Generate added in v0.16.0

func (p *Plugin) Generate(config launchr.GenerateConfig) error

Generate implements launchr.GeneratePlugin interface.

func (*Plugin) OnAppInit added in v0.16.0

func (p *Plugin) OnAppInit(app launchr.App) error

OnAppInit implements launchr.OnAppInitPlugin interface.

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() launchr.PluginInfo

PluginInfo implements launchr.Plugin interface.

type UsePluginInfo

type UsePluginInfo struct {
	Path    string
	Version string
}

UsePluginInfo stores plugin info.

func UsePluginInfoFromString

func UsePluginInfoFromString(s string) UsePluginInfo

UsePluginInfoFromString constructs mod plugin info.

func (UsePluginInfo) String

func (p UsePluginInfo) String() string

Jump to

Keyboard shortcuts

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