|
1 | 1 | # frozen_string_literal: true
|
2 | 2 |
|
| 3 | +require_relative "ubuntu/arch" |
| 4 | +require_relative "ubuntu/edition" |
| 5 | +require_relative "ubuntu/url" |
| 6 | + |
3 | 7 | module RootFS
|
4 | 8 | module Distro
|
5 | 9 | module Ubuntu
|
6 |
| - # https://ubuntu.com/download |
7 |
| - |
8 |
| - # https://wiki.ubuntu.com/Releases |
9 |
| - # http://releases.ubuntu.com/ |
10 |
| - # https://cloud-images.ubuntu.com/ |
11 |
| - LTS = { |
12 |
| - jammy: "22.04", |
13 |
| - focal: "20.04", |
14 |
| - bionic: "18.04" |
15 |
| - } |
16 |
| - |
17 |
| - ESM = { |
18 |
| - xenial: "16.04", |
19 |
| - trusty: "14.04" |
20 |
| - } |
21 |
| - |
22 |
| - DEV = { |
23 |
| - lunar: "23.04", |
24 |
| - kinetic: "22.10" |
25 |
| - } |
26 |
| - |
27 |
| - CODENAME_VERSION = {}.merge(DEV, LTS, ESM) |
28 |
| - |
29 |
| - EDITION_RELEASE_URL = { |
30 |
| - Desktop: "http://cdimage.ubuntu.com/releases/", |
31 |
| - Server: "http://cdimage.ubuntu.com/releases/", |
32 |
| - Base: "http://cdimage.ubuntu.com/ubuntu-base/releases/", |
33 |
| - Cloud: "https://cloud-images.ubuntu.com/releases/", |
34 |
| - Minimal: "https://cloud-images.ubuntu.com/minimal/releases/" |
35 |
| - } |
36 |
| - |
37 |
| - EDITION_DAILY_URL = { |
38 |
| - Desktop: "http://cdimage.ubuntu.com/", |
39 |
| - Server: "http://cdimage.ubuntu.com/ubuntu-server/", |
40 |
| - Base: "http://cdimage.ubuntu.com/ubuntu-base/", |
41 |
| - Cloud: "https://cloud-images.ubuntu.com/", |
42 |
| - Minimal: "https://cloud-images.ubuntu.com/minimal/daily/" |
43 |
| - } |
44 |
| - |
45 |
| - def is_lts?(any) |
46 |
| - str = any.to_s |
47 |
| - LTS.each do |code, ver| |
48 |
| - return true if str == code.to_s |
49 |
| - return true if str.start_with?(ver) |
50 |
| - end |
51 |
| - false |
52 |
| - end |
53 | 10 | end
|
54 | 11 | end
|
55 | 12 | end
|
0 commit comments