template

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template struct {
	// Builds is a list of export template compilation definitions that are
	// required by the resulting export template artifact.
	Builds []scons.Build `hash:"set"`

	// ExtraArtifacts are the base names of export template artifacts which are
	// expected to be found in the 'bin' directory post-compilation. If these
	// are missing, 'gdbuild' will consider the build to have failed. Note that
	// the artifacts pertaining to 'Builds' do not need to be specified.
	ExtraArtifacts []string `hash:"ignore"`

	// Paths is a list of additional files and folders which this template
	// depends on. Useful for recording dependencies which are defined in
	// otherwise opaque properties like 'Hook'.
	Paths []osutil.Path `hash:"set"`

	// Prebuild contains an ordered list of actions to execute prior to
	// compilation of the export templates.
	Prebuild action.Action `hash:"string"`

	// Postbuild contains an ordered list of actions to execute after
	// compilation of the export templates.
	Postbuild action.Action `hash:"string"`
}

Template defines a Godot export template compilation. Its scope is limited to the compilation step.

func (*Template) Action

func (t *Template) Action(rc *run.Context) action.Action

Action creates an 'action.Action' for running the build actions.

func (*Template) Artifacts

func (t *Template) Artifacts() []string

Artifacts returns the set of export template artifacts required by the underlying template build definition. This will join the files generated by the included 'Binary' definitions with those added in 'ExtraArtifacts'.

func (*Template) Checksum

func (t *Template) Checksum() (string, error)

Checksum produces a checksum hash of the export template specification. When the checksums of two 'Template' definitions matches, the resulting export templates will be equivalent.

NOTE: This implementation relies on producers of 'Template' to correctly register all file system dependencies within 'Paths'.

func (*Template) RegisterDependencyPath

func (t *Template) RegisterDependencyPath(path osutil.Path)

RegisterDependencyPath is a convenience function for registering a 'Path' dependency, but only if it hasn't been added yet.

func (*Template) String

func (t *Template) String() string

Jump to

Keyboard shortcuts

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