mirror of
https://github.com/icewind1991/nextcloud-version-matrix.git
synced 2026-06-03 17:44:08 +02:00
check for branched version instead of releases:
This commit is contained in:
parent
b9b8f0b2b3
commit
d43cc64aae
2 changed files with 4 additions and 4 deletions
|
|
@ -4,8 +4,8 @@ const DOMParser = require('xmldom').DOMParser;
|
|||
const fs = require('fs');
|
||||
const urlExist = require('url-exist');
|
||||
|
||||
function isVersionReleased(version) {
|
||||
return urlExist(`https://download.nextcloud.com/server/releases/latest-${version}.zip`);
|
||||
function versionHashBranch(version) {
|
||||
return urlExist(`https://github.com/nextcloud/server/tree/stable${version}`);
|
||||
}
|
||||
|
||||
function range(from, to) {
|
||||
|
|
@ -31,7 +31,7 @@ function onlyUnique(value, index, array) {
|
|||
core.setOutput("versions", JSON.stringify(versions));
|
||||
|
||||
const branches = await Promise.all(versions.map(async (version) => {
|
||||
if (await isVersionReleased(version)) {
|
||||
if (await versionHashBranch(version)) {
|
||||
return `stable${version}`;
|
||||
} else {
|
||||
return "master";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue