From 75ae065ae676fd2cf4ee617e4c1b43804876756b Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 26 Jan 2023 11:49:51 +0000 Subject: [PATCH] Fix computation of fallback version --- lib/setup-codeql.js | 15 +++++++++++---- lib/setup-codeql.js.map | 2 +- src/setup-codeql.ts | 21 +++++++++++++++++---- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/lib/setup-codeql.js b/lib/setup-codeql.js index f87c1b3712..30b2dcc909 100644 --- a/lib/setup-codeql.js +++ b/lib/setup-codeql.js @@ -211,12 +211,19 @@ async function getCodeQLBundleDownloadURL(tagName, apiDetails, variant, logger) } return `https://github.com/${exports.CODEQL_DEFAULT_ACTION_REPOSITORY}/releases/download/${tagName}/${codeQLBundleName}`; } +function getBundleVersionFromTagName(tagName) { + const match = tagName.match(/^codeql-bundle-(.*)$/); + if (match === null || match.length < 2) { + throw new Error(`Malformed bundle tag name: ${tagName}. Bundle version could not be inferred`); + } + return match[1]; +} function getBundleVersionFromUrl(url) { - const match = url.match(/\/codeql-bundle-(.*)\//); + const match = url.match(/\/(codeql-bundle-.*)\//); if (match === null || match.length < 2) { throw new Error(`Malformed tools url: ${url}. Bundle version could not be inferred`); } - return match[1]; + return getBundleVersionFromTagName(match[1]); } exports.getBundleVersionFromUrl = getBundleVersionFromUrl; function convertToSemVer(version, logger) { @@ -349,14 +356,14 @@ async function getCodeQLSource(toolsInput, bypassToolcache, defaultCliVersion, a } } if (!codeqlFolder && requestedVersion.cliVersion) { - // Fall back to accepting a `0.0.0-` version if we didn't find the + // Fall back to accepting a `0.0.0-` version if we didn't find the // `x.y.z` version. This is to support old versions of the toolcache. // // If we are on Dotcom, we will make an HTTP request to the Releases API here // to find the tag name for the requested version. tagName = tagName || (await getOrFindBundleTagName(requestedVersion, logger)); - const fallbackVersion = convertToSemVer(tagName, logger); + const fallbackVersion = convertToSemVer(getBundleVersionFromTagName(tagName), logger); logger.debug(`Computed a fallback toolcache version number of ${fallbackVersion} for CodeQL tools version ` + `${requestedVersion.cliVersion}.`); codeqlFolder = toolcache.find("CodeQL", fallbackVersion); diff --git a/lib/setup-codeql.js.map b/lib/setup-codeql.js.map index fdd0ef5fd6..4d8b7cc0ca 100644 --- a/lib/setup-codeql.js.map +++ b/lib/setup-codeql.js.map @@ -1 +1 @@ -{"version":3,"file":"setup-codeql.js","sourceRoot":"","sources":["../src/setup-codeql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AAEzB,2CAA6B;AAC7B,2CAAyC;AAEzC,+DAAiD;AACjD,sEAAuD;AACvD,+CAAiC;AACjC,+BAAoC;AAEpC,iDAAsD;AACtD,kDAAoC;AACpC,kGAAkG;AAClG,mGAAmG;AACnG,oBAAoB;AACpB,0DAA4C;AAE5C,iCAAqC;AAErC,6CAA+B;AAC/B,iCAAuC;AAE1B,QAAA,gCAAgC,GAAG,sBAAsB,CAAC;AAEvE,SAAS,mBAAmB;IAC1B,IAAI,QAAgB,CAAC;IACrB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QAChC,QAAQ,GAAG,OAAO,CAAC;KACpB;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE;QACvC,QAAQ,GAAG,SAAS,CAAC;KACtB;SAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACxC,QAAQ,GAAG,OAAO,CAAC;KACpB;SAAM;QACL,OAAO,sBAAsB,CAAC;KAC/B;IACD,OAAO,iBAAiB,QAAQ,SAAS,CAAC;AAC5C,CAAC;AAED,SAAgB,yBAAyB,CAAC,MAAc;IACtD,IAAI,IAAA,mCAAoB,GAAE,EAAE;QAC1B,kFAAkF;QAClF,kFAAkF;QAClF,gFAAgF;QAChF,MAAM,CAAC,IAAI,CACT,uFAAuF,CACxF,CAAC;QACF,OAAO,wCAAgC,CAAC;KACzC;IAED,OAAO,IAAI,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,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M,CACP,CAAC;YACF,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;YACnC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;YACnC,uBAAuB,GAAG,MAAM,CAAC,uBAAuB,CAAC;YACzD,WAAW,GAAG,kBAAW,CAAC,QAAQ,CAAC;YACnC,MAAM;SACP;QACD;YACE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;KAC5B;IACD,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AAC9E,CAAC;AAxDD,8CAwDC"} \ No newline at end of file diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts index 434699f954..27548158a4 100644 --- a/src/setup-codeql.ts +++ b/src/setup-codeql.ts @@ -241,14 +241,24 @@ async function getCodeQLBundleDownloadURL( return `https://github.com/${CODEQL_DEFAULT_ACTION_REPOSITORY}/releases/download/${tagName}/${codeQLBundleName}`; } +function getBundleVersionFromTagName(tagName: string): string { + const match = tagName.match(/^codeql-bundle-(.*)$/); + if (match === null || match.length < 2) { + throw new Error( + `Malformed bundle tag name: ${tagName}. Bundle version could not be inferred` + ); + } + return match[1]; +} + export function getBundleVersionFromUrl(url: string): string { - const match = url.match(/\/codeql-bundle-(.*)\//); + const match = url.match(/\/(codeql-bundle-.*)\//); if (match === null || match.length < 2) { throw new Error( `Malformed tools url: ${url}. Bundle version could not be inferred` ); } - return match[1]; + return getBundleVersionFromTagName(match[1]); } export function convertToSemVer(version: string, logger: Logger): string { @@ -448,14 +458,17 @@ export async function getCodeQLSource( } if (!codeqlFolder && requestedVersion.cliVersion) { - // Fall back to accepting a `0.0.0-` version if we didn't find the + // Fall back to accepting a `0.0.0-` version if we didn't find the // `x.y.z` version. This is to support old versions of the toolcache. // // If we are on Dotcom, we will make an HTTP request to the Releases API here // to find the tag name for the requested version. tagName = tagName || (await getOrFindBundleTagName(requestedVersion, logger)); - const fallbackVersion = convertToSemVer(tagName, logger); + const fallbackVersion = convertToSemVer( + getBundleVersionFromTagName(tagName), + logger + ); logger.debug( `Computed a fallback toolcache version number of ${fallbackVersion} for CodeQL tools version ` + `${requestedVersion.cliVersion}.`