mirror of
https://github.com/icewind1991/nextcloud-version-matrix.git
synced 2026-06-03 09:34:12 +02:00
feat: Expose PHP version IDs
Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
parent
526e105a38
commit
f3db10bae6
2 changed files with 30 additions and 0 deletions
15
dist/index.js
vendored
15
dist/index.js
vendored
|
|
@ -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 {
|
||||
|
|
@ -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]);
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue