feat: allow using "next" version on supported version (#58)

This also allows using the action in https://github.com/mage-os/generate-mirror-repo-js where the test module is an external package installed with composer. In this case, no local path repo configuration is needed.

Co-authored-by: Vinai Kopp <Vinai@users.noreply.github.com>
This commit is contained in:
Damien Retzinger
2022-10-11 16:19:49 -04:00
committed by GitHub
parent 3e4d3c1645
commit 7431dcb7af
14 changed files with 119 additions and 10 deletions
@@ -3,6 +3,9 @@ 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';
export const getMatrixForKind = (kind: string, versions: string = "") => {
switch(kind){
@@ -10,6 +13,8 @@ export const getMatrixForKind = (kind: string, versions: string = "") => {
return getMatrixForVersions(latestJson);
case 'currently-supported':
return getMatrixForVersions(currentlySupportedJson);
case 'nightly':
return amendMatrixForNext(getMatrixForVersions(nightly), 'https://upstream-mirror.mage-os.org', getDayBefore());
case 'all':
return getMatrixForVersions(Object.keys(allVersions));
case 'custom':