build: ensure KDE Neon is in the supported dist list.

See #312
This commit is contained in:
Alexandre Pujol 2024-04-28 17:17:29 +01:00
parent c7fb47e97a
commit aa94ce1740
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 25 additions and 1 deletions

View file

@ -23,7 +23,7 @@ var (
supportedDists = map[string][]string{ supportedDists = map[string][]string{
"arch": {}, "arch": {},
"debian": {}, "debian": {},
"ubuntu": {}, "ubuntu": {"neon"},
"opensuse": {"suse", "opensuse-tumbleweed"}, "opensuse": {"suse", "opensuse-tumbleweed"},
"whonix": {}, "whonix": {},
} }

View file

@ -67,6 +67,20 @@ PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Linux 37 (Workstation Edition)" PRETTY_NAME="Fedora Linux 37 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180" ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon` LOGO=fedora-logo-icon`
osReleaseNeon = `PRETTY_NAME="KDE neon 6.0"
NAME="KDE neon"
VERSION_ID="22.04"
VERSION="6.0"
VERSION_CODENAME=jammy
ID=neon
ID_LIKE="ubuntu debian"
HOME_URL="https://neon.kde.org/"
SUPPORT_URL="https://neon.kde.org/"
BUG_REPORT_URL="https://bugs.kde.org/"
PRIVACY_POLICY_URL="https://kde.org/privacypolicy/"
UBUNTU_CODENAME=jammy
LOGO=start-here-kde-neon`
) )
func Test_getOSRelease(t *testing.T) { func Test_getOSRelease(t *testing.T) {
@ -156,6 +170,11 @@ func Test_getDistribution(t *testing.T) {
osRelease: osReleaseFedora, osRelease: osReleaseFedora,
want: "fedora", want: "fedora",
}, },
{
name: "Neon",
osRelease: osReleaseNeon,
want: "neon",
},
} }
osReleaseFile = "/tmp/os-release" osReleaseFile = "/tmp/os-release"
@ -200,6 +219,11 @@ func Test_getFamily(t *testing.T) {
dist: "opensuse", dist: "opensuse",
want: "zypper", want: "zypper",
}, },
{
name: "Neon",
dist: "neon",
want: "",
},
} }
for _, tt := range tests { for _, tt := range tests {