From cc87a792c5000b4826bcb030a29c917566b723ae Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 17 Nov 2018 15:53:27 +0000 Subject: [PATCH] Now .out-of-tree.toml can also define version of distro --- main.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e3c8b60..c5b2004 100644 --- a/main.go +++ b/main.go @@ -28,8 +28,9 @@ import ( ) type kernelMask struct { - DistroType distroType - ReleaseMask string + DistroType distroType + DistroRelease string // 18.04/7.4.1708/9.1 + ReleaseMask string } type artifactType int @@ -71,6 +72,12 @@ func (ka artifact) checkSupport(ki kernelInfo, km kernelMask) ( return } + // DistroRelease is optional + if km.DistroRelease != "" && ki.DistroRelease != km.DistroRelease { + supported = false + return + } + supported, err = regexp.MatchString(km.ReleaseMask, ki.KernelRelease) return }