Add 'includes' to CompileSpec

The includes field is an array of regexp used to indicate what include
inside the packag. It can be omitted to default behavior (all)
This commit is contained in:
Ettore Di Giacinto
2019-11-14 17:43:47 +01:00
parent 08944a22ac
commit 0eef18d75c
5 changed files with 41 additions and 7 deletions

View File

@@ -31,6 +31,7 @@ type LuetCompilationSpec struct {
Package pkg.Package `json:"-"`
OutputPath string `json:"-"` // Where the build processfiles go
Unpack bool `json:"unpack"`
Includes []string `json:"includes"`
}
func NewLuetCompilationSpec(b []byte, p pkg.Package) (CompilationSpec, error) {
@@ -59,6 +60,10 @@ func (cs *LuetCompilationSpec) GetPreBuildSteps() []string {
return cs.Prelude
}
func (cs *LuetCompilationSpec) GetIncludes() []string {
return cs.Includes
}
func (cs *LuetCompilationSpec) GetSeedImage() string {
return cs.Seed
}