buildops

package
v1.2.27 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SupportedPlatformsParam - name of build-params property for supported platforms
	SupportedPlatformsParam = "supported-platforms"

	// ModuleArtifactDefaultName - the default name of the build artifact.
	// It can be changed using properties like build-result or build-artifact-name in the build parameters.
	ModuleArtifactDefaultName = "data.zip"
)
View Source
const (
	// WrongBuildResultMsg - message raised on wrong build result
	WrongBuildResultMsg = `the build result must be a string; change "%v" in the "%s" module for a string value`
	// WrongBuildArtifactNameMsg - message raised on wrong build artifact name
	WrongBuildArtifactNameMsg = `the build artifact name must be a string; change "%v" in the "%s" module for a string value`
)

Variables

This section is empty.

Functions

func GetModuleSourceArtifactPath added in v0.2.9

func GetModuleSourceArtifactPath(loc dir.ISourceModule, depDesc bool, module *mta.Module, defaultBuildResult string, resolveBuildResult bool) (path string, e error)

GetModuleSourceArtifactPath - get the module's artifact that has to be archived in the mtar, from the project sources

func GetModuleTargetArtifactPath added in v0.2.9

func GetModuleTargetArtifactPath(moduleLoc dir.IModule, depDesc bool, module *mta.Module, defaultBuildResult string,
	resolveBuildResult bool) (path string, toArchive bool, e error)

GetModuleTargetArtifactPath - get the path to where the module's artifact should be created in the temp folder, from which it's archived in the mtar

func GetModulesNames

func GetModulesNames(m *mta.MTA) ([]string, error)

GetModulesNames returns a list of module names.

func GetRequiresArtifacts added in v0.3.6

func GetRequiresArtifacts(ep dir.ISourceModule, mta *mta.MTA, requires *BuildRequires, moduleName string, resolveBuildResult bool) (source string, target string, patterns []string, err error)

GetRequiresArtifacts returns the source path, target path and patterns of files and folders to copy from a module's requires section

func IfNoSource added in v1.0.9

func IfNoSource(module *mta.Module) bool

IfNoSource - checks if "no-source" build parameter defined and set to "true"

func IsArchive added in v0.2.9

func IsArchive(path string, resolvePath bool) (isArchive bool, e error)

IsArchive - check if file is a folder or an archive

func PlatformDefined

func PlatformDefined(module *mta.Module, platform string) bool

PlatformDefined - if platform defined If platforms parameter not defined then no limitations on platform, method returns true Non empty list of platforms has to contain specific platform

func ProcessDependencies

func ProcessDependencies(mtaParser dir.IMtaParser, moduleSource dir.ISourceModule, moduleName string) error

ProcessDependencies - processes module dependencies function prepares all artifacts required for module copying them from required modules

func ProcessRequirements

func ProcessRequirements(ep dir.ISourceModule, mta *mta.MTA, requires *BuildRequires, moduleName string) error

ProcessRequirements - Processes build requirement of module (using moduleName).

func ProvideModules

func ProvideModules(source, desc string, extensions []string, wdGetter func() (string, error)) error

ProvideModules - provides modules in order of their dependencies

Types

type BuildRequires

type BuildRequires struct {
	Name       string   `yaml:"name,omitempty"`
	Artifacts  []string `yaml:"artifacts,omitempty"`
	TargetPath string   `yaml:"target-path,omitempty"`
}

BuildRequires - build requires section.

func GetBuildRequires added in v0.3.6

func GetBuildRequires(module *mta.Module) []BuildRequires

GetBuildRequires - gets Requires property of module's build-params property as generic property and converts it to slice of BuildRequires structures

Jump to

Keyboard shortcuts

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