1
0
Fork 0

Now .out-of-tree.toml can also define version of distro

timestamps
dump_stack() 2018-11-17 15:53:27 +00:00
parent a138681e1d
commit cc87a792c5
1 changed files with 9 additions and 2 deletions

11
main.go
View File

@ -28,8 +28,9 @@ import (
) )
type kernelMask struct { type kernelMask struct {
DistroType distroType DistroType distroType
ReleaseMask string DistroRelease string // 18.04/7.4.1708/9.1
ReleaseMask string
} }
type artifactType int type artifactType int
@ -71,6 +72,12 @@ func (ka artifact) checkSupport(ki kernelInfo, km kernelMask) (
return return
} }
// DistroRelease is optional
if km.DistroRelease != "" && ki.DistroRelease != km.DistroRelease {
supported = false
return
}
supported, err = regexp.MatchString(km.ReleaseMask, ki.KernelRelease) supported, err = regexp.MatchString(km.ReleaseMask, ki.KernelRelease)
return return
} }