Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidInput = errors.New("invalid input")
var ErrMissingInput = errors.New("missing input")
Functions ¶
func NewCopyArtifactsAction ¶ added in v0.3.0
NewCopyArtifactsAction creates an 'action.Action' which moves the generated Godot artifacts to the output directory.
func NewVerifyArtifactsAction ¶
func NewVerifyArtifactsAction( _ *Context, root osutil.Path, artifacts []string, ) action.WithDescription[action.Function]
NewVerifyArtifactsAction creates an 'action.Action' which verifies that all required artifacts have been generated.
Types ¶
type Context ¶
type Context struct { // DryRun determines whether the specified command will be executed. DryRun bool // Target is the name of the target specified during an export command. // // HACK: Context should realistically be divided into per-command contexts // so that properties can be specialized. For now, deal with this. It's only // set for 'gdbuild target'. Target string // Verbose determines whether to enable additional logging output. Verbose bool // Features is the list of feature tags to enable. Features []string // Platform is the target platform to build for. Platform platform.OS // Profile is the GDBuild optimization level to build with. Profile engine.Profile // PathManifest is the path to the GDBuild manifest. This is used to locate // relative paths in various other properties. PathManifest osutil.Path // PathOut is the directory in which to move built artifacts to. PathOut osutil.Path // PathWorkspace is a working directory in which to run relevant commands. // The use case for the directory is command-specific. PathWorkspace osutil.Path // contains filtered or unexported fields }
Context contains build command inputs that are invocation-specific. These need to be explicitly set per invocation as they can't be parsed from a GDBuild manifest.
func (*Context) GodotPath ¶ added in v0.3.4
GodotPath returns the path to the Godot editor executable.
func (*Context) GodotProjectManifestPath ¶ added in v0.2.3
GodotProjectManifestPath returns the path to the Godot project manifest file.
func (*Context) HasTempDir ¶ added in v0.2.3
HasTempDir returns whether a run-specific temporary directory has been created.
type Hook ¶
type Hook struct { // Pre contains a command to run *before* an export step. Pre []action.Command `toml:"run_before"` // Post contains a command to run *after* an export step. Post []action.Command `toml:"run_after"` // Shell defines which shell process to run these commands in. Shell exec.Shell `toml:"shell"` }
Hook contains commands to execute before and after a build step.
TODO: Allow per-hook shell settings.
func (Hook) PostActions ¶
PostActions is a utility function to convert post-build commands into a slice of 'Action' types.
func (Hook) PreActions ¶
PreActions is a utility function to convert pre-build commands into a slice of 'Action' types.