Skip to content

Commit 3ac39a8

Browse files
committed
feat: add Ubuntu::ESM, use Hash.merge
1 parent 1f28420 commit 3ac39a8

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

lib/rootfs/distro/ubuntu.rb

+11-10
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@ module Ubuntu
66
# https://ubuntu.com/download
77

88
# https://wiki.ubuntu.com/Releases
9+
# http://releases.ubuntu.com/
910
# https://cloud-images.ubuntu.com/
10-
CODENAME_VERSION = {
11-
lunar: "23.04",
12-
kinetic: "22.10",
11+
LTS = {
1312
jammy: "22.04",
1413
focal: "20.04",
15-
bionic: "18.04",
16-
xenial: "16.04",
17-
trusty: "14.04"
14+
bionic: "18.04"
1815
}
1916

20-
LTS = {
21-
jammy: "22.04",
22-
focal: "20.04",
23-
bionic: "18.04",
17+
ESM = {
2418
xenial: "16.04",
2519
trusty: "14.04"
2620
}
2721

22+
DEV = {
23+
lunar: "23.04",
24+
kinetic: "22.10"
25+
}
26+
27+
CODENAME_VERSION = {}.merge(DEV, LTS, ESM)
28+
2829
EDITION_RELEASE_URL = {
2930
Desktop: "http://cdimage.ubuntu.com/releases/",
3031
Server: "http://cdimage.ubuntu.com/releases/",

lib/rootfs/distro/ubuntu_test.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
require_relative "ubuntu"
44

55
class MyClass
6+
extend RootFS::Distro::Ubuntu
67
include RootFS::Distro::Ubuntu
78
end
89

910
u = MyClass.new
1011

11-
p u.is_lts?("20.04.5")
12+
p u.is_lts?("20.04.5")
13+
p MyClass::CODENAME_VERSION

0 commit comments

Comments
 (0)