Extract semantic CLI version from URL when requesting specific tools
This commit is contained in:
parent
5489416722
commit
2bf10dc4b9
12 changed files with 217 additions and 149 deletions
7
lib/setup-codeql.js
generated
7
lib/setup-codeql.js
generated
|
|
@ -315,6 +315,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian
|
|||
// If a tools URL was provided, then use that.
|
||||
tagName = tryGetTagNameFromUrl(toolsInput, logger);
|
||||
url = toolsInput;
|
||||
if (tagName) {
|
||||
const bundleVersion = tryGetBundleVersionFromTagName(tagName, logger);
|
||||
// If the bundle version is a semantic version, it is a CLI version number.
|
||||
if (bundleVersion && semver.valid(bundleVersion)) {
|
||||
cliVersion = convertToSemVer(bundleVersion, logger);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Otherwise, use the default CLI version passed in.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue