Skip to content
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

Merged
merged 6 commits into from
Jan 28, 2025

Conversation

lbussell
Copy link
Contributor

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.

@lbussell lbussell requested a review from a team as a code owner January 28, 2025 01:59
Comment on lines 180 to 210
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.")
Copy link
Member

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.

Copy link
Contributor Author

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)?

@lbussell lbussell merged commit ecb5f5f into dotnet:main Jan 28, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants