mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
feat(supported-version): dynamically compute (#120)
Previously, I maintained supported versions by revising a file of versions. This was monotonous, like time. Now, these are just based upon the documented EoL dates of the versions published by Magento.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import { getMatrixForVersions } from "./get-matrix-for-versions";
|
||||
|
||||
import latestJson from '../kind/latest.json';
|
||||
import currentlySupportedJson from '../kind/currently-supported.json';
|
||||
import allVersions from '../versions/individual.json';
|
||||
import nightly from '../kind/nightly.json';
|
||||
import { amendMatrixForNext } from "../nightly/get-next-version";
|
||||
import { getDayBefore } from '../nightly/get-day-before';
|
||||
import { getCurrentlySupportedVersions } from "../kind/get-currently-supported";
|
||||
|
||||
export const getMatrixForKind = (kind: string, versions: string = "") => {
|
||||
export const getMatrixForKind = (kind: string, versions = "") => {
|
||||
switch(kind){
|
||||
case 'latest':
|
||||
return getMatrixForVersions(latestJson);
|
||||
case 'currently-supported':
|
||||
return getMatrixForVersions(currentlySupportedJson);
|
||||
return getMatrixForVersions(getCurrentlySupportedVersions(new Date()));
|
||||
case 'nightly':
|
||||
return amendMatrixForNext(getMatrixForVersions(nightly), 'https://upstream-mirror.mage-os.org', getDayBefore());
|
||||
case 'all':
|
||||
|
||||
Reference in New Issue
Block a user