make it simpler to add exceptions for future off-schedule releases
Signed-off-by: Brian Phillips <28457+brianphillips@users.noreply.github.com>
This commit is contained in:
@@ -57,14 +57,17 @@ function getReleaseSchedule() {
|
||||
const firstReleaseYear = 2022;
|
||||
const firstReleaseMonth = 2;
|
||||
|
||||
// for any releases that are off schedule (i.e. v1.25.0 was released
|
||||
// in the same month as v1.24.0), we need to adjust the release date
|
||||
const offScheduleReleases = [25];
|
||||
|
||||
return Array(100)
|
||||
.fill(0)
|
||||
.map((_, i) => {
|
||||
// the 1.24 and 1.25 releases were both released in March 2024
|
||||
const modifier = i >= 25 ? -1 : 0;
|
||||
const modifier = offScheduleReleases.filter(v => i >= v).length;
|
||||
const date = getReleaseOfMonth(
|
||||
firstReleaseYear,
|
||||
firstReleaseMonth + i + modifier,
|
||||
firstReleaseMonth + i - modifier,
|
||||
);
|
||||
return { version: `1.${i}.0`, date };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user