setup

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPrerequisites

func CheckPrerequisites(ctx context.Context) error

func ChooseBoardURL

func ChooseBoardURL(instanceName, detectedURL string, detectedErr error) (string, bool)

func Existing

func Existing(ctx context.Context, opts *Options) error

func InstallInvocation

func InstallInvocation(user, email, title, siteURL, password string) ([]string, map[string]string)

InstallInvocation returns the sh arguments and environment that run xf:install.

func InstanceTitle

func InstanceTitle(title, instanceName string) string

InstanceTitle formats a site title with its instance name. An empty title defaults to "XenForo".

func PrintSkippedStep

func PrintSkippedStep(current, total int, label, reason string)

func PrintStartHint

func PrintStartHint(dir string)

func PrintUsefulCommands

func PrintUsefulCommands()

func RunComposerInstall

func RunComposerInstall(ctx context.Context, runner *environment.Runner, root string, verbose bool) error

RunComposerInstall installs Composer dependencies inside the container: the root project's, then those of any add-on that still lacks them.

A failing add-on is reported but not fatal. Its dependencies only matter once the add-on is installed, and an add-on's manifest can stop resolving on its own, such as when Composer starts blocking a pinned version with a security advisory. Failing here would make every new environment unusable.

func RunJavaScript

func RunJavaScript(ctx context.Context, opts *Options, step, totalSteps int) error

RunJavaScript builds only JavaScript, never release tasks or configured commands. Add-on failures warn and continue; core failures and cancellation stop setup. Both init modes call this before any container startup.

func ShouldRunComposer

func ShouldRunComposer(targetPath string) bool

ShouldRunComposer reports whether a directory is a Composer project.

Repository checkouts track composer.json, so a fresh worktree has one and its dependencies must be installed. Release packages ship vendor/ prebuilt and have no manifest, so they are skipped automatically.

Types

type Options

type Options struct {
	TargetPath      string
	InstanceName    string
	SiteTitle       string
	AdminUser       string
	AdminPassword   string
	AdminEmail      string
	Contexts        []string
	EnvResolved     map[string]string
	StartContainers bool
	SkipComposer    bool
	SkipBuildJS     bool
	SkipInstall     bool
}

Jump to

Keyboard shortcuts

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