async function getReleaseInfo(
  version,
  platform,
  arch,
  cacheDir,
  manifestUrl,
) {
  let releaseData = undefined;
  let manifestPath = undefined;
  if (platform === 'osx' && arch === 'arm64') {
    manifestPath = path.resolve(cacheDir, 'manifest.mac.arm.json');
  } else {
    manifestPath = path.resolve(cacheDir, 'manifest.json');
  }

  try {
    const data = await getManifest(manifestUrl);
    if (data !== undefined) {
      await fs.promises.writeFile(manifestPath, data.slice(9));
    }

    let manifest = JSON.parse(await fs.promises.readFile(manifestPath));
    if (version === 'latest' || version === 'stable' || version === 'lts') {
      // Remove leading "v" from version string
      version = manifest[version].slice(1);
    }

    releaseData = manifest.versions.find(
      (release) => release.version === `v${version}`,
    );
  } catch {
    console.error(
      'The version manifest does not exist/was not downloaded. Please try again in some time.',
    );
  }
  return releaseData;
}
Get version specific release metadata.
@param  {string} version      NW version
@param  {string} platform     NW platform
@param  {string} arch         NW architecture
@param  {string} cacheDir     Directory to store NW binaries
@param  {string} manifestUrl  Url to manifest
@returns {object}              Version specific release info