@@ -10,9 +10,9 @@ import { getActionsLogger, Logger } from "./logging";
10
10
import * as util from "./util" ;
11
11
12
12
const UPDATEJOB_PROXY = "update-job-proxy" ;
13
- const UPDATEJOB_PROXY_VERSION = "v2.0.20240722180912 " ;
14
- const UPDATEJOB_PROXY_URL =
15
- "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/update-job-proxy.tar.gz " ;
13
+ const UPDATEJOB_PROXY_VERSION = "v2.0.20241023203727 " ;
14
+ const UPDATEJOB_PROXY_URL_PREFIX =
15
+ "https://github.com/github/codeql-action/releases/download/codeql-bundle-v2.18.1/" ;
16
16
const PROXY_USER = "proxy_user" ;
17
17
const KEY_SIZE = 2048 ;
18
18
const KEY_EXPIRY_YEARS = 2 ;
@@ -229,17 +229,28 @@ function getProxyAuth(): BasicAuthCredentials | undefined {
229
229
}
230
230
231
231
async function getProxyBinaryPath ( ) : Promise < string > {
232
- let proxyBin = toolcache . find ( UPDATEJOB_PROXY , UPDATEJOB_PROXY_VERSION ) ;
232
+ const proxyFileName =
233
+ process . platform === "win32" ? `${ UPDATEJOB_PROXY } .exe` : UPDATEJOB_PROXY ;
234
+ const platform =
235
+ process . platform === "win32"
236
+ ? "win64"
237
+ : process . platform === "darwin"
238
+ ? "osx64"
239
+ : "linux64" ;
240
+ const proxyPackage = `${ UPDATEJOB_PROXY } -${ platform } .tar.gz` ;
241
+ const proxyURL = `${ UPDATEJOB_PROXY_URL_PREFIX } ${ proxyPackage } ` ;
242
+
243
+ let proxyBin = toolcache . find ( proxyFileName , UPDATEJOB_PROXY_VERSION ) ;
233
244
if ( ! proxyBin ) {
234
- const temp = await toolcache . downloadTool ( UPDATEJOB_PROXY_URL ) ;
245
+ const temp = await toolcache . downloadTool ( proxyURL ) ;
235
246
const extracted = await toolcache . extractTar ( temp ) ;
236
247
proxyBin = await toolcache . cacheDir (
237
248
extracted ,
238
- UPDATEJOB_PROXY ,
249
+ proxyFileName ,
239
250
UPDATEJOB_PROXY_VERSION ,
240
251
) ;
241
252
}
242
- proxyBin = path . join ( proxyBin , UPDATEJOB_PROXY ) ;
253
+ proxyBin = path . join ( proxyBin , proxyFileName ) ;
243
254
return proxyBin ;
244
255
}
245
256
0 commit comments