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
|
|
@ -400,6 +400,14 @@ export async function getCodeQLSource(
|
|||
// 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.
|
||||
cliVersion = defaultCliVersion.cliVersion;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue