mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
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:
@@ -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);
|
||||
Reference in New Issue
Block a user