Score:0

Getting the latest LTS codename through cURL

ng flag

I want to get the latest LTS version's code-name for my Docker build CI programmatically through cURL. Is there any API-friendly way to query this or do I need to handle the scraping stuff and math logic from https://cdimage.ubuntu.com/releases/ index (not necessarily Ubuntu-dependent but can be used on any distro)?

Arctic Kona avatar
jp flag
Since you mentioned other distros, for Debian you can curl its repo like so `curl https://deb.debian.org/debian/dists/stable/Release | grep ^Codename: `
Score:2
us flag

You can do what do-release-upgrade does and use https://changelogs.ubuntu.com/meta-release-lts to get the list of LTS releases and parse that:

% curl -s https://changelogs.ubuntu.com/meta-release-lts | grep Name: | tail -n1
Name: Focal Fossa

The format of https://changelogs.ubuntu.com/meta-release-lts is fairly simple and shouldn't be difficult to parse. There's also https://changelogs.ubuntu.com/meta-release for all releases.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.