Added compilation environment array to BPM config

This commit is contained in:
EnumDev 2025-04-22 17:41:37 +03:00
parent e8d5f0a565
commit 8b6ef5fa63
3 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
ignore_packages: []
compilation_env: []
repositories:
- name: example-repository
source: https://my-repo.xyz/

View File

@ -89,6 +89,7 @@ func CompileSourcePackage(archiveFilename, outputFilename string) (err error) {
env = append(env, "BPM_PKG_VERSION="+bpmpkg.PkgInfo.Version)
env = append(env, "BPM_PKG_REVISION="+strconv.Itoa(bpmpkg.PkgInfo.Revision))
env = append(env, "BPM_PKG_ARCH="+GetArch())
env = append(env, BPMConfig.CompilationEnvironment...)
// Execute prepare and build functions in source.sh script
cmd := exec.Command("bash", "-c",

View File

@ -6,8 +6,9 @@ import (
)
type BPMConfigStruct struct {
IgnorePackages []string `yaml:"ignore_packages"`
Repositories []*Repository `yaml:"repositories"`
IgnorePackages []string `yaml:"ignore_packages"`
CompilationEnvironment []string `yaml:"compilation_env"`
Repositories []*Repository `yaml:"repositories"`
}
var BPMConfig BPMConfigStruct