Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Configure composer version in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mischabraam committed May 27, 2024
1 parent 795e1c6 commit e5adf00
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM php:${php.version}-cli-${php.variant}

# Magento 2 does not support Composer 2
COPY --from=composer:1 /usr/bin/composer /usr/bin/composer
COPY --from=composer:${composer} /usr/bin/composer /usr/bin/composer

<% if (php.variant.startsWith('alpine')) { %>
RUN apk add --no-cache unzip \
Expand Down
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ for (const magentoVersion of magentoVersions) {
for (const phpVariant of semverMetrixConfig.php) {
matrixVersions.push({
magento: magentoVersion,
composer: semverMetrixConfig.composer,
php: phpVariant.version,
variant: phpVariant.variant
});
Expand All @@ -48,6 +49,7 @@ matrixVersions = tags(matrixVersions);
for (const matrixVersion of matrixVersions) {
const matrixDockerfile = _.template(dockerfile)({
magento: matrixVersion.version.magento,
composer: matrixVersion.version.composer,
php: {
version: matrixVersion.version.php,
variant: matrixVersion.version.variant
Expand All @@ -59,6 +61,7 @@ for (const matrixVersion of matrixVersions) {

matrix.push({
version: matrixVersion.version.magento,
composer: matrixVersion.version.composer,
php: {
version: matrixVersion.version.php,
variant: matrixVersion.version.variant
Expand Down
3 changes: 3 additions & 0 deletions lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"lodash": "^4.17.20",
"path": "^0.12.7",
"semver": "^7.3.4"
},
"volta": {
"node": "14.21.3"
}
}
2 changes: 2 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
">= 2.4": {
"composer": "2",
"php": [
{
"version": "8.1",
Expand Down Expand Up @@ -36,6 +37,7 @@
]
},
">= 2.3": {
"composer": "1",
"php": [
{
"version": "7.3",
Expand Down

0 comments on commit e5adf00

Please sign in to comment.