mirror of
https://github.com/icewind1991/nextcloud-version-matrix.git
synced 2026-11-30 07:50:47 +01:00
Merge pull request #11 from nickvergessen/bugfix/noid/rebuild-dist
chore(assets): Recompile assets
This commit is contained in:
commit
acad0d760b
3 changed files with 83 additions and 0 deletions
40
.github/workflows/dist.yml
vendored
Normal file
40
.github/workflows/dist.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: Check dist is up-to-date
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check_dist:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Check dist is up-to-date
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Set up node
|
||||||
|
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
cache: npm
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
run: |
|
||||||
|
if [ -n "$(git status --porcelain dist)" ]; then
|
||||||
|
git status dist
|
||||||
|
git diff dist
|
||||||
|
echo "::error::dist is outdated, run 'npm ci && npm run build' and commit the result"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
|
@ -1,5 +1,8 @@
|
||||||
name: Test the action
|
name: Test the action
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
@ -13,6 +16,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Execute action
|
- name: Execute action
|
||||||
id: run
|
id: run
|
||||||
|
|
|
||||||
38
dist/index.mjs
vendored
38
dist/index.mjs
vendored
|
|
@ -58398,11 +58398,40 @@ url_exist__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ?
|
||||||
|
|
||||||
const client = new _actions_http_client__WEBPACK_IMPORTED_MODULE_7__/* .HttpClient */ .Qq('nextcloud-version-matrix')
|
const client = new _actions_http_client__WEBPACK_IMPORTED_MODULE_7__/* .HttpClient */ .Qq('nextcloud-version-matrix')
|
||||||
|
|
||||||
|
// Known PHP version ranges of the stable branches of nextcloud/server.
|
||||||
|
// Values match what parsing lib/versioncheck.php of the branch would yield.
|
||||||
|
const KNOWN_PHP_VERSION_RANGES = {
|
||||||
|
stable22: {min: 7.3, max: 8.0},
|
||||||
|
stable23: {min: 7.3, max: 8.0},
|
||||||
|
stable24: {min: 7.4, max: 8.1},
|
||||||
|
stable25: {min: 7.4, max: 8.1},
|
||||||
|
stable26: {min: 8.0, max: 8.2},
|
||||||
|
stable27: {min: 8.0, max: 8.2},
|
||||||
|
stable28: {min: 8.0, max: 8.3},
|
||||||
|
stable29: {min: 8.0, max: 8.3},
|
||||||
|
stable30: {min: 8.1, max: 8.3},
|
||||||
|
stable31: {min: 8.1, max: 8.4},
|
||||||
|
stable32: {min: 8.1, max: 8.4},
|
||||||
|
stable33: {min: 8.2, max: 8.5},
|
||||||
|
stable34: {min: 8.2, max: 8.5},
|
||||||
|
stable35: {min: 8.3, max: 8.5},
|
||||||
|
};
|
||||||
|
|
||||||
|
// PHP versions known to have a php-src release tag.
|
||||||
|
const KNOWN_RELEASED_PHP_VERSIONS = new Set([
|
||||||
|
'7.0', '7.1', '7.2', '7.3', '7.4',
|
||||||
|
'8.0', '8.1', '8.2', '8.3', '8.4', '8.5',
|
||||||
|
]);
|
||||||
|
|
||||||
function versionHashBranch(version) {
|
function versionHashBranch(version) {
|
||||||
return (0,url_exist__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(`https://github.com/nextcloud/server/tree/stable${version}`);
|
return (0,url_exist__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(`https://github.com/nextcloud/server/tree/stable${version}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getBranch(version) {
|
async function getBranch(version) {
|
||||||
|
if (KNOWN_PHP_VERSION_RANGES[`stable${version}`]) {
|
||||||
|
return `stable${version}`;
|
||||||
|
}
|
||||||
|
|
||||||
if (await versionHashBranch(version)) {
|
if (await versionHashBranch(version)) {
|
||||||
return `stable${version}`;
|
return `stable${version}`;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -58415,6 +58444,10 @@ function range(from, to) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSupportedVersions(branch) {
|
async function getSupportedVersions(branch) {
|
||||||
|
if (KNOWN_PHP_VERSION_RANGES[branch]) {
|
||||||
|
return {...KNOWN_PHP_VERSION_RANGES[branch]};
|
||||||
|
}
|
||||||
|
|
||||||
// yes, this is hacky, but it saves having to keep a list updated
|
// yes, this is hacky, but it saves having to keep a list updated
|
||||||
let res = await client.get(`https://raw.githubusercontent.com/nextcloud/server/${branch}/lib/versioncheck.php`);
|
let res = await client.get(`https://raw.githubusercontent.com/nextcloud/server/${branch}/lib/versioncheck.php`);
|
||||||
let versionCheckCode = await res.readBody();
|
let versionCheckCode = await res.readBody();
|
||||||
|
|
@ -58436,6 +58469,11 @@ function parseVersionId(raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function isPhpVersionReleased(version) {
|
async function isPhpVersionReleased(version) {
|
||||||
|
const shortVersion = version.toFixed(1);
|
||||||
|
if (KNOWN_RELEASED_PHP_VERSIONS.has(shortVersion)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return await (0,url_exist__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(`https://github.com/php/php-src/releases/tag/php-${version.toFixed(1)}.0`);
|
return await (0,url_exist__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(`https://github.com/php/php-src/releases/tag/php-${version.toFixed(1)}.0`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue