feat(supported-versions): add release date (#100)

Previously, we didn't take into account a release date, which meant
that @vinai could not add MageOS or Magento releases before the actual
day of release.

With this, we can now add the releases to supported verisons before
a release comes out, allowing us to make a kind that allows testing
MageOS and Magento Mirror releases more quickly.
This commit is contained in:
Damien Retzinger
2023-08-16 05:57:48 -06:00
committed by GitHub
parent c093834133
commit 5599a0d2e7
6 changed files with 57 additions and 15 deletions
+4 -4
View File
File diff suppressed because one or more lines are too long
@@ -11,16 +11,7 @@ describe('getCurrentlySupportedVersions', () => {
// versions.
['2023-01-01T00:00:00Z', 'First day of 2023', [
'magento/project-community-edition:2.4.4-p2',
'magento/project-community-edition:2.4.4-p3',
'magento/project-community-edition:2.4.4-p4',
'magento/project-community-edition:2.4.4-p5',
'magento/project-community-edition:2.4.5-p1',
'magento/project-community-edition:2.4.5-p2',
'magento/project-community-edition:2.4.5-p3',
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6',
'magento/project-community-edition:2.4.6-p1',
'magento/project-community-edition:2.4.6-p2',
'magento/project-community-edition:2.4.5-p1',
]],
['2024-01-01T00:00:00Z', 'First day of 2024', [
'magento/project-community-edition:2.4.4-p5',
@@ -36,6 +27,15 @@ describe('getCurrentlySupportedVersions', () => {
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
]],
['2023-03-14T00:00:00Z', 'Day of v2.4.6 Release', [
'magento/project-community-edition:2.4.4-p2',
'magento/project-community-edition:2.4.5-p1'
]],
['2023-03-15T00:00:00Z', 'Day after v2.4.6 Release', [
'magento/project-community-edition:2.4.4-p3',
'magento/project-community-edition:2.4.5-p2',
'magento/project-community-edition:2.4.6'
]],
['2025-08-09T00:00:00Z', 'Day of v2.4.5 EoL', [
'magento/project-community-edition:2.4.5-p4',
'magento/project-community-edition:2.4.6-p2',
@@ -3,5 +3,9 @@ import allVersions from '../versions/individual.json';
export const getCurrentlySupportedVersions = (date: Date): string[] =>
Object.entries(<Record<string,MagentoMatrixVersion>>allVersions)
.filter(([key, value]) => new Date(value.eol) >= date)
.filter(([key, value]) => {
const dayAfterRelease = new Date(value.release);
dayAfterRelease.setDate(dayAfterRelease.getDate() + 1);
return date >= dayAfterRelease && new Date(value.eol) >= date;
})
.map(([key, value]) => key);
@@ -9,6 +9,7 @@ export interface MagentoMatrixVersion {
varnish: string,
nginx: string,
os: string,
release: string,
eol: string
}
@@ -10,6 +10,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2018-11-28T00:00:00+0000",
"eol": "2022-09-30T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.0 <2.4.1": {
@@ -23,6 +24,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-07-28T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.1 <2.4.2": {
@@ -36,6 +38,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-10-15T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.2 <2.4.3": {
@@ -49,6 +52,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-02-09T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.3 <2.4.4": {
@@ -62,6 +66,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-08-10T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.4 <2.4.5": {
@@ -75,6 +80,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-04-12T00:00:00+0000",
"eol": "2025-04-24T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.5 <2.4.6": {
@@ -88,6 +94,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2025-08-09T00:00:00+0000"
},
"magento/project-community-edition:>=2.4.6 <2.4.7": {
@@ -101,6 +108,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
},
"magento/project-community-edition": {
@@ -114,6 +122,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2015-11-17T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
},
"magento/project-community-edition:next": {
@@ -127,6 +136,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2015-11-17T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
}
}
@@ -10,6 +10,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-04-12T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.3.7-p4": {
@@ -23,6 +24,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-09-30T00:00:00+0000"
},
"magento/project-community-edition:2.4.0": {
@@ -36,6 +38,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-07-28T00:00:00+0000",
"eol": "2020-10-15T00:00:00+0000"
},
"magento/project-community-edition:2.4.0-p1": {
@@ -49,6 +52,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-10-15T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.1": {
@@ -62,6 +66,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2020-10-15T00:00:00+0000",
"eol": "2021-02-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.1-p1": {
@@ -75,6 +80,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-02-09T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.2": {
@@ -88,6 +94,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-02-09T00:00:00+0000",
"eol": "2021-05-11T00:00:00+0000"
},
"magento/project-community-edition:2.4.2-p1": {
@@ -101,6 +108,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-05-11T00:00:00+0000",
"eol": "2021-08-10T00:00:00+0000"
},
"magento/project-community-edition:2.4.2-p2": {
@@ -114,6 +122,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-08-10T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.3": {
@@ -127,6 +136,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-08-10T00:00:00+0000",
"eol": "2021-10-12T00:00:00+0000"
},
"magento/project-community-edition:2.4.3-p1": {
@@ -140,6 +150,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2021-10-12T00:00:00+0000",
"eol": "2022-04-12T00:00:00+0000"
},
"magento/project-community-edition:2.4.3-p2": {
@@ -153,6 +164,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-04-12T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.3-p3": {
@@ -166,6 +178,7 @@
"varnish": "varnish:6.0",
"nginx": "nginx:1.18",
"os": "ubuntu-20.04",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-11-28T00:00:00+0000"
},
"magento/project-community-edition:2.4.4": {
@@ -179,6 +192,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-04-12T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p1": {
@@ -192,6 +206,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-10-11T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p2": {
@@ -205,6 +220,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-10-11T00:00:00+0000",
"eol": "2023-03-14T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p3": {
@@ -218,6 +234,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2023-06-13T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p4": {
@@ -231,6 +248,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-06-13T00:00:00+0000",
"eol": "2023-08-08T00:00:00+0000"
},
"magento/project-community-edition:2.4.4-p5": {
@@ -244,6 +262,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2025-04-24T00:00:00+0000"
},
"magento/project-community-edition:2.4.5": {
@@ -257,6 +276,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-08-09T00:00:00+0000",
"eol": "2022-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p1": {
@@ -270,6 +290,7 @@
"varnish": "varnish:7.0",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2022-10-11T00:00:00+0000",
"eol": "2023-03-14T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p2": {
@@ -283,6 +304,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2023-06-13T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p3": {
@@ -296,6 +318,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-06-13T00:00:00+0000",
"eol": "2023-08-08T00:00:00+0000"
},
"magento/project-community-edition:2.4.5-p4": {
@@ -309,6 +332,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2025-08-09T00:00:00+0000"
},
"magento/project-community-edition:2.4.6": {
@@ -322,6 +346,7 @@
"varnish": "varnish:7.1",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-03-14T00:00:00+0000",
"eol": "2023-06-13T00:00:00+0000"
},
"magento/project-community-edition:2.4.6-p1": {
@@ -335,6 +360,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-06-13T00:00:00+0000",
"eol": "2023-08-08T00:00:00+0000"
},
"magento/project-community-edition:2.4.6-p2": {
@@ -348,6 +374,7 @@
"varnish": "varnish:7.3",
"nginx": "nginx:1.22",
"os": "ubuntu-latest",
"release": "2023-08-08T00:00:00+0000",
"eol": "2026-03-14T00:00:00+0000"
}
}