Skip to content
Merged
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
15 changes: 15 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42616,6 +42616,19 @@ function copy(obj) {
return res;
}

// Formatted according to PHP_VERSION_ID
function getPHPVersionID(version) {
const parts = version.split('.');
let value = parseInt(parts[0]) * 10000;
if (parts.length > 1) {
value += parseInt(parts[1]) * 100;
}
if (parts.length > 2) {
value += parseInt(parts[2]);
}
return value.toString();
}


(async () => {
try {
Expand Down Expand Up @@ -42745,7 +42758,9 @@ function copy(obj) {
core.setOutput("branches-max-list", JSON.stringify([branches[branches.length - 1]]));

core.setOutput("php-min", php[0]);
core.setOutput("php-min-id", getPHPVersionID(php[0]));
core.setOutput("php-max", php[php.length - 1]);
core.setOutput("php-max-id", getPHPVersionID(php[php.length - 1]));
core.setOutput("php-available", availablePhp);
core.setOutput("branches-min", branches[0]);
core.setOutput("branches-max", branches[branches.length - 1]);
Expand Down
15 changes: 15 additions & 0 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ function copy(obj) {
return res;
}

// Formatted according to PHP_VERSION_ID
function getPHPVersionID(version) {
const parts = version.split('.');
let value = parseInt(parts[0]) * 10000;
if (parts.length > 1) {
value += parseInt(parts[1]) * 100;
}
if (parts.length > 2) {
value += parseInt(parts[2]);
}
return value.toString();
}


(async () => {
try {
Expand Down Expand Up @@ -231,7 +244,9 @@ function copy(obj) {
core.setOutput("branches-max-list", JSON.stringify([branches[branches.length - 1]]));

core.setOutput("php-min", php[0]);
core.setOutput("php-min-id", getPHPVersionID(php[0]));
core.setOutput("php-max", php[php.length - 1]);
core.setOutput("php-max-id", getPHPVersionID(php[php.length - 1]));
core.setOutput("php-available", availablePhp);
core.setOutput("branches-min", branches[0]);
core.setOutput("branches-max", branches[branches.length - 1]);
Expand Down