fix bazelisk on wind

This commit is contained in:
Alex Rodionov 2024-05-31 16:30:22 -07:00
parent 64039eff0a
commit 5137014566
6 changed files with 26 additions and 10 deletions

14
dist/main/index.js vendored
View file

@ -96973,7 +96973,15 @@ async function downloadBazelisk() {
core.debug('Adding to the cache...')
fs.chmodSync(downloadPath, '755')
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
let bazelBinName = 'bazel'
let bazeliskBinName = 'bazelisk'
if (platform == 'windows') {
bazelBinName = `${bazelBinName}.exe`
bazeliskBinName = `${bazelBinName}.exe`
}
const cachePath = await tc.cacheFile(downloadPath, bazelBinName, bazeliskBinName, version)
core.info(`Successfully cached bazelisk to ${cachePath}`)
return cachePath
@ -97058,7 +97066,7 @@ async function startRemoteCacheServer() {
return
}
core.startGroup("Remote cache server")
core.startGroup("Start remote cache server")
core.info(`Remote cache server log file path: ${config.remoteCache.logPath}`)
const log = fs.openSync(config.remoteCache.logPath, 'a')
@ -97068,7 +97076,7 @@ async function startRemoteCacheServer() {
stdio: ['ignore', log, log]
})
core.info(`Started remote cache server (${serverProcess.pid})`)
core.info(`Started remote cache server with PID: ${serverProcess.pid}`)
core.saveState('remote-cache-server-pid', serverProcess.pid.toString())
serverProcess.unref()

File diff suppressed because one or more lines are too long

2
dist/post/index.js vendored
View file

@ -95961,7 +95961,7 @@ async function stopRemoteCacheServer() {
return
}
core.startGroup("Remote cache server")
core.startGroup("Stop remote cache server")
const pid = core.getState('remote-cache-server-pid')
if (pid) {
try {

File diff suppressed because one or more lines are too long

View file

@ -97,7 +97,15 @@ async function downloadBazelisk() {
core.debug('Adding to the cache...')
fs.chmodSync(downloadPath, '755')
const cachePath = await tc.cacheFile(downloadPath, 'bazel', 'bazelisk', version)
let bazelBinName = 'bazel'
let bazeliskBinName = 'bazelisk'
if (platform == 'windows') {
bazelBinName = `${bazelBinName}.exe`
bazeliskBinName = `${bazelBinName}.exe`
}
const cachePath = await tc.cacheFile(downloadPath, bazelBinName, bazeliskBinName, version)
core.info(`Successfully cached bazelisk to ${cachePath}`)
return cachePath
@ -182,7 +190,7 @@ async function startRemoteCacheServer() {
return
}
core.startGroup("Remote cache server")
core.startGroup("Start remote cache server")
core.info(`Remote cache server log file path: ${config.remoteCache.logPath}`)
const log = fs.openSync(config.remoteCache.logPath, 'a')
@ -192,7 +200,7 @@ async function startRemoteCacheServer() {
stdio: ['ignore', log, log]
})
core.info(`Started remote cache server (${serverProcess.pid})`)
core.info(`Started remote cache server with PID: ${serverProcess.pid}`)
core.saveState('remote-cache-server-pid', serverProcess.pid.toString())
serverProcess.unref()

View file

@ -16,7 +16,7 @@ async function stopRemoteCacheServer() {
return
}
core.startGroup("Remote cache server")
core.startGroup("Stop remote cache server")
const pid = core.getState('remote-cache-server-pid')
if (pid) {
try {