mirror of https://github.com/actions/toolkit
adding more debugging statements
parent
a2852cee6f
commit
c14e304555
|
@ -42,9 +42,11 @@ export async function createZipUploadStream(
|
||||||
|
|
||||||
zip.on('finish', zipFinishCallback)
|
zip.on('finish', zipFinishCallback)
|
||||||
zip.on('end', zipEndCallback)
|
zip.on('end', zipEndCallback)
|
||||||
|
core.debug(`Number of files to upload: ${uploadSpecification.length}`)
|
||||||
for (const file of uploadSpecification) {
|
for (const file of uploadSpecification) {
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
if (file.sourcePath !== null) {
|
if (file.sourcePath !== null) {
|
||||||
|
core.debug(`Creating file entry: ${file.sourcePath}`)
|
||||||
// Add a normal file to the zip
|
// Add a normal file to the zip
|
||||||
zip.entry(
|
zip.entry(
|
||||||
createReadStream(file.sourcePath),
|
createReadStream(file.sourcePath),
|
||||||
|
@ -56,6 +58,7 @@ export async function createZipUploadStream(
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// add directory to zip
|
// add directory to zip
|
||||||
|
core.debug(`Creating directory entry: ${file.destinationPath}`)
|
||||||
zip.entry(
|
zip.entry(
|
||||||
null,
|
null,
|
||||||
{name: `${file.destinationPath}/`},
|
{name: `${file.destinationPath}/`},
|
||||||
|
@ -69,6 +72,7 @@ export async function createZipUploadStream(
|
||||||
}
|
}
|
||||||
|
|
||||||
zip.finalize()
|
zip.finalize()
|
||||||
|
core.debug(`Finalizing entries`)
|
||||||
const bufferSize = getUploadChunkSize()
|
const bufferSize = getUploadChunkSize()
|
||||||
const zipUploadStream = new ZipUploadStream(bufferSize)
|
const zipUploadStream = new ZipUploadStream(bufferSize)
|
||||||
zip.pipe(zipUploadStream) // Pipe the zip stream into zipUploadStream
|
zip.pipe(zipUploadStream) // Pipe the zip stream into zipUploadStream
|
||||||
|
|
Loading…
Reference in New Issue