mirror of
https://github.com/github/codeql-action.git
synced 2026-05-02 03:40:10 +00:00
Use getDefaultCliVersion for start-proxy
This commit is contained in:
Generated
+9
-7
@@ -121699,17 +121699,19 @@ function getProxyPackage() {
|
||||
function getFallbackUrl(proxyPackage) {
|
||||
return `${UPDATEJOB_PROXY_URL_PREFIX}${proxyPackage}`;
|
||||
}
|
||||
async function getLinkedRelease() {
|
||||
async function getReleaseByVersion(version) {
|
||||
return getApiClient().rest.repos.getReleaseByTag({
|
||||
owner: "github",
|
||||
repo: "codeql-action",
|
||||
tag: bundleVersion
|
||||
tag: version
|
||||
});
|
||||
}
|
||||
async function getDownloadUrl(logger) {
|
||||
async function getDownloadUrl(logger, features) {
|
||||
const proxyPackage = getProxyPackage();
|
||||
try {
|
||||
const cliRelease = await getLinkedRelease();
|
||||
const gitHubVersion = await getGitHubVersion();
|
||||
const versionInfo = await features.getDefaultCliVersion(gitHubVersion.type);
|
||||
const cliRelease = await getReleaseByVersion(versionInfo.tagName);
|
||||
for (const asset of cliRelease.data.assets) {
|
||||
if (asset.name === proxyPackage) {
|
||||
logger.info(
|
||||
@@ -121781,9 +121783,9 @@ async function cacheProxy(logger, source, filename, version) {
|
||||
function getProxyFilename() {
|
||||
return process.platform === "win32" ? `${UPDATEJOB_PROXY}.exe` : UPDATEJOB_PROXY;
|
||||
}
|
||||
async function getProxyBinaryPath(logger) {
|
||||
async function getProxyBinaryPath(logger, features) {
|
||||
const proxyFileName = getProxyFilename();
|
||||
const proxyInfo = await getDownloadUrl(logger);
|
||||
const proxyInfo = await getDownloadUrl(logger, features);
|
||||
let proxyBin = toolcache.find(proxyFileName, proxyInfo.version);
|
||||
if (!proxyBin) {
|
||||
const apiDetails = getApiDetails();
|
||||
@@ -122141,7 +122143,7 @@ async function run(startedAt) {
|
||||
all_credentials: credentials,
|
||||
ca
|
||||
};
|
||||
const proxyBin = await getProxyBinaryPath(logger);
|
||||
const proxyBin = await getProxyBinaryPath(logger, features);
|
||||
const proxyInfo = await startProxy(
|
||||
proxyBin,
|
||||
proxyConfig,
|
||||
|
||||
Reference in New Issue
Block a user