builder

package
v2.3.19 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package builder compiles a custom slack-bot binary which includes all plugins listed in the "plugins" config section.

It generates a Go module with a main package importing the slack-bot core and the plugins, which are resolved by Go modules into one consistent set of dependencies, and runs "go build". See docs/plugins.md

Index

Constants

View Source
const CoreModule = "github.com/innogames/slack-bot/v2"

CoreModule is the module path of the slack-bot core

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, opts Options) error

Build compiles a custom bot binary with all plugins of the config

func GetBuilderVersion

func GetBuilderVersion() string

GetBuilderVersion returns the slack-bot version of this builder, when it was installed like "go run github.com/innogames/slack-bot/v2/cmd/slack-bot-builder@v2.5.0". It's empty for local builds.

Types

type Options

type Options struct {
	// ConfigPath is the config file or directory (like for the bot itself) which contains the "plugins" section
	ConfigPath string

	// Output is the path of the built bot binary
	Output string

	// CLIOutput is the path of the built CLI binary (bot emulator in the terminal), it's only built when set
	CLIOutput string

	// Core is the version (like "v2.5.0") or a local directory of the slack-bot core. Default: version of the builder
	Core string

	// WorkDir is the directory of the generated Go module. Default: temporary directory, which is removed after the build
	WorkDir string

	// Tags is a comma separated list of Go build tags, e.g. "pprof"
	Tags string

	// DryRun only resolves the plugins and prints the generated files, without building the binaries
	DryRun bool

	// Log receives the progress and the output of the executed go and git commands. Default: os.Stderr
	Log io.Writer
}

Options of a custom bot build

Jump to

Keyboard shortcuts

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