Documentation ¶
Index ¶
- Constants
- func GetModuleSourceArtifactPath(loc dir.ISourceModule, depDesc bool, module *mta.Module, ...) (path string, e error)
- func GetModuleTargetArtifactPath(moduleLoc dir.IModule, depDesc bool, module *mta.Module, ...) (path string, toArchive bool, e error)
- func GetModulesNames(m *mta.MTA) ([]string, error)
- func GetRequiresArtifacts(ep dir.ISourceModule, mta *mta.MTA, requires *BuildRequires, moduleName string, ...) (source string, target string, patterns []string, err error)
- func IfNoSource(module *mta.Module) bool
- func IsArchive(path string, resolvePath bool) (isArchive bool, e error)
- func PlatformDefined(module *mta.Module, platform string) bool
- func ProcessDependencies(mtaParser dir.IMtaParser, moduleSource dir.ISourceModule, moduleName string) error
- func ProcessRequirements(ep dir.ISourceModule, mta *mta.MTA, requires *BuildRequires, moduleName string) error
- func ProvideModules(source, desc string, extensions []string, wdGetter func() (string, error)) error
- type BuildRequires
Constants ¶
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" )
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 ¶
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
IfNoSource - checks if "no-source" build parameter defined and set to "true"
func PlatformDefined ¶
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).
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