mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
fix: pass correct repo url for nightly (#158)
fix: pass correct repo url for nightly The amendMatrixForNext function uses the repository argument to determine the version constraint for the returned matrix for kind nightly. Previously, the upstream-mirror repo url was passed as an argument, but the nightly builds use a different repo url. This resulted in failed builds, because the version string 'next' could not be parsed by composer. Example: https://github.com/mage-os/generate-mirror-repo-js/actions/runs/6370219504/job/17291152703 With this change, the nightly kind will always return the @alpha version constraint, that is, stability constraint. There currently is no way to distinguish between different nightly repos, but since both work the same way, this is fine (for now).
This commit is contained in:
Vendored
+4
-4
File diff suppressed because one or more lines are too long
@@ -36,6 +36,7 @@ describe('getMatrixForKind for mage-os', () => {
|
||||
const result = getMatrixForKind("nightly", project);
|
||||
expect(result.magento).toBeDefined();
|
||||
expect(result.include).toBeDefined();
|
||||
expect(result.magento[0]).toBe('mage-os/project-community-edition:@alpha');
|
||||
});
|
||||
|
||||
it('returns a matrix for the next release when using `nightly`', () => {
|
||||
|
||||
@@ -14,7 +14,7 @@ export const getMatrixForKind = (kind: string, project: string, versions = "") =
|
||||
case 'currently-supported':
|
||||
return getMatrixForVersions(project, getCurrentlySupportedVersions(project, new Date()));
|
||||
case 'nightly':
|
||||
return amendMatrixForNext(getMatrixForVersions(project, nightlyJson[project]), 'https://upstream-mirror.mage-os.org', getDayBefore());
|
||||
return amendMatrixForNext(getMatrixForVersions(project, nightlyJson[project]), 'https://upstream-nightly.mage-os.org', getDayBefore());
|
||||
case 'all':
|
||||
return getMatrixForVersions(project, Object.keys(getIndividualVersionsForProject(project)));
|
||||
case 'custom':
|
||||
|
||||
Reference in New Issue
Block a user