Skip to content
Snippets Groups Projects
Unverified Commit f035a205 authored by Diego Sampaio's avatar Diego Sampaio Committed by GitHub
Browse files

Chore: Fix fetching Apps-Engine and MongoDB versions for release notes (#28129)

parent 5bfcab04
No related branches found
Tags xwiki-platform-14.10.19
No related merge requests found
const { execSync } = require('child_process');
const getMongoVersion = async function({ version, git }) {
try {
const workflows = await git.show([`${ version }:.github/workflows/build_and_test.yml`]);
const workflows = await git.show([`${ version }:.github/workflows/ci.yml`]);
const mongoMatch = workflows.match(/mongodb\-version: \[([^\]]+)\]/);
const mongoMatch = workflows.match(/compatibleMongoVersions\\": \[([^\]]+)\]/);
if (!mongoMatch) {
return [];
}
......@@ -38,11 +40,14 @@ const getNodeNpmVersions = async function({ version, git, request }) {
const getAppsEngineVersion = async function({ version, git }) {
try {
const packageJson = await git.show([`${ version }:apps/meteor/package-lock.json`]);
const { dependencies } = JSON.parse(packageJson);
const { version: appsEngineVersion } = dependencies['@rocket.chat/apps-engine'];
const result = execSync('yarn why @rocket.chat/apps-engine --json');
const resultString = result.toString();
return appsEngineVersion;
const match = resultString.match(/"@rocket.chat\/meteor@workspace:apps\/meteor".*"@rocket\.chat\/apps\-engine@npm:([^"]+)"/);
if (match) {
return match[1];
}
} catch (e) {
console.error(e);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment