mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
Add mariner to distro types (#520)
Signed-off-by: Jamie Magee <jamie.magee@gmail.com>
This commit is contained in:
parent
0395c47445
commit
270fbb7665
@ -118,6 +118,11 @@ func TestIdentifyDistro(t *testing.T) {
|
||||
Type: CentOS,
|
||||
Version: "5.7.0",
|
||||
},
|
||||
{
|
||||
fixture: "test-fixtures/os/mariner",
|
||||
Type: Mariner,
|
||||
Version: "1.0.0",
|
||||
},
|
||||
}
|
||||
|
||||
observedDistros := internal.NewStringSet()
|
||||
|
||||
9
syft/distro/test-fixtures/os/mariner/etc/os-release
Normal file
9
syft/distro/test-fixtures/os/mariner/etc/os-release
Normal file
@ -0,0 +1,9 @@
|
||||
NAME="Common Base Linux Mariner"
|
||||
VERSION="1.0.20210901"
|
||||
ID=mariner
|
||||
VERSION_ID=1.0
|
||||
PRETTY_NAME="CBL-Mariner/Linux"
|
||||
ANSI_COLOR="1;34"
|
||||
HOME_URL="https://aka.ms/cbl-mariner"
|
||||
BUG_REPORT_URL="https://aka.ms/cbl-mariner"
|
||||
SUPPORT_URL="https://aka.ms/cbl-mariner"
|
||||
@ -20,6 +20,7 @@ const (
|
||||
SLES Type = "sles"
|
||||
Photon Type = "photon"
|
||||
Windows Type = "windows"
|
||||
Mariner Type = "mariner"
|
||||
)
|
||||
|
||||
// All contains all Linux distribution options
|
||||
@ -38,6 +39,7 @@ var All = []Type{
|
||||
SLES,
|
||||
Photon,
|
||||
Windows,
|
||||
Mariner,
|
||||
}
|
||||
|
||||
// IDMapping connects a distro ID like "ubuntu" to a Distro type
|
||||
@ -56,6 +58,7 @@ var IDMapping = map[string]Type{
|
||||
"sles": SLES,
|
||||
"photon": Photon,
|
||||
"windows": Windows,
|
||||
"mariner": Mariner,
|
||||
}
|
||||
|
||||
// String returns the string representation of the given Linux distribution.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user