-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add all known unreleased Debian version codenames #1570
Conversation
string s when s.Contains("debian") => "Debian", | ||
string s when s.Contains("sid") => "Debian Unstable", | ||
string s when s.Contains("jessie") => "Debian 8", | ||
string s when s.Contains("stretch") => "Debian 9", | ||
string s when s.Contains("buster") => "Debian 10", | ||
string s when s.Contains("bullseye") => "Debian 11", | ||
string s when s.Contains("bookworm") => "Debian 12", | ||
string s when s.Contains("trixie") => "Debian 13", | ||
string s when s.Contains("forky") => "Debian 14", | ||
string s when s.Contains("duke") => "Debian 15", | ||
string s when s.Contains("xenial") => "Ubuntu 16.04", | ||
string s when s.Contains("bionic") => "Ubuntu 18.04", | ||
string s when s.Contains("disco") => "Ubuntu 19.04", | ||
string s when s.Contains("focal") => "Ubuntu 20.04", | ||
string s when s.Contains("hirsute") => "Ubuntu 21.04", | ||
string s when s.Contains("impish") => "Ubuntu 21.10", | ||
string s when s.Contains("jammy") => "Ubuntu 22.04", | ||
string s when s.Contains("noble") => "Ubuntu 24.04", | ||
string s when s.Contains("azurelinux") => | ||
FormatVersionableOsName(os, name => "Azure Linux"), | ||
string s when s.Contains("cbl-mariner") => | ||
FormatVersionableOsName(os, name => "CBL-Mariner"), | ||
string s when s.Contains("leap") => | ||
FormatVersionableOsName(os, name => "openSUSE Leap"), | ||
string s when s.Contains("ubuntu") => | ||
FormatVersionableOsName(os, name => "Ubuntu"), | ||
string s when s.Contains("alpine") | ||
|| s.Contains("centos") | ||
|| s.Contains("fedora") => | ||
FormatVersionableOsName(os, name => name.FirstCharToUpper()), | ||
_ => throw new NotSupportedException($"The OS version '{os}' is not supported.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a reason to keep around the legacy versions that we no longer (and will never) produce images for (e.g. Debian 9). There's also no need for sid
as we'll never consume that version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, I suppose we could get of everything up to and including bullseye (and impish for ubuntu)?
Part of dotnet/dotnet-docker#6166.
This covers new Debian versions for approximately the next 6 years 👍
I also halved the number of lines in these methods by using switch expressions. Commits are separate so you can easily see exactly what I added.