Download bazelisk as bazel.exe on Windows

This commit is contained in:
Alex Rodionov 2024-10-30 14:16:10 -07:00
parent 93a72482ba
commit dac93a5ea3
5 changed files with 632 additions and 230 deletions

View file

@ -65,8 +65,10 @@ async function downloadBazelisk() {
}
let filename = `bazelisk-${platform}-${arch}`
let toolname = 'bazel' // alias bazelisk as bazel
if (platform == 'windows') {
filename = `${filename}.exe`
toolName = `${toolname}.exe`
}
const token = core.getInput('token')
@ -96,7 +98,7 @@ async function downloadBazelisk() {
core.debug('Adding to the cache...');
fs.chmodSync(downloadPath, '755');
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
const cachePath = await tc.cacheFile(downloadPath, toolname, 'bazelisk', version)
core.debug(`Successfully cached bazelisk to ${cachePath}`)
return cachePath