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

Determine composer based on magento version #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading