Use browser_download_url instead of url

This commit is contained in:
Michael B. Gale
2025-09-17 16:54:20 +01:00
parent 16dc289a78
commit 232500c05c
3 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -49528,10 +49528,10 @@ async function getDownloadUrl(logger) {
for (const asset of cliRelease.data.assets) {
if (asset.name === proxyPackage) {
logger.info(
`Found '${proxyPackage}' in release '${bundleVersion}' at '${asset.url}'`
`Found '${proxyPackage}' in release '${bundleVersion}' at '${asset.browser_download_url}'`
);
return {
url: asset.url,
url: asset.browser_download_url,
// The `update-job-proxy` doesn't have a version as such. Since we now bundle it
// with CodeQL CLI bundle releases, we use the corresponding CLI version to
// differentiate between (potentially) different versions of `update-job-proxy`.
+5 -2
View File
@@ -255,8 +255,11 @@ test("getDownloadUrl returns fallback when there's no matching release asset", a
test("getDownloadUrl returns matching release asset", async (t) => {
const assets = [
{ name: "foo", url: "other-url" },
{ name: startProxyExports.getProxyPackage(), url: "url-we-want" },
{ name: "foo", browser_download_url: "other-url" },
{
name: startProxyExports.getProxyPackage(),
browser_download_url: "url-we-want",
},
];
mockGetReleaseByTag(assets);
+2 -2
View File
@@ -231,10 +231,10 @@ export async function getDownloadUrl(
for (const asset of cliRelease.data.assets) {
if (asset.name === proxyPackage) {
logger.info(
`Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.url}'`,
`Found '${proxyPackage}' in release '${defaults.bundleVersion}' at '${asset.browser_download_url}'`,
);
return {
url: asset.url,
url: asset.browser_download_url,
// The `update-job-proxy` doesn't have a version as such. Since we now bundle it
// with CodeQL CLI bundle releases, we use the corresponding CLI version to
// differentiate between (potentially) different versions of `update-job-proxy`.