add progress nums to output message

Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
This commit is contained in:
Eli Uriegas 2021-05-19 16:07:11 -07:00
parent 3349d0b44d
commit 0504774707
No known key found for this signature in database
GPG key ID: EE2C3B4893010973
2 changed files with 15 additions and 5 deletions

6
dist/index.js vendored
View file

@ -31208,6 +31208,7 @@ function run() {
throw new Error(`Could not find objects with ${s3Prefix}`);
}
core.info(`Found ${objects.Contents.length} objects with prefix ${s3Prefix}`);
let num = 1;
for (const fileObject of objects.Contents) {
if (!fileObject.Key) {
continue;
@ -31218,9 +31219,10 @@ function run() {
core.debug(`Creating directory (${localKeyDir}) since it did not exist`);
fs.mkdirSync(localKeyDir, { recursive: true });
}
core.info(`Starting download (): ${localKey}`);
core.info(`Starting download (${num}/${objects.Contents.length}): ${localKey}`);
yield doDownload(s3, s3Bucket, fileObject.Key, fs.createWriteStream(localKey));
core.info(`Finished download: ${localKey}`);
core.info(`Finished download (${num}/${objects.Contents.length}): ${localKey}`);
num++;
}
// output the directory that the artifact(s) was/were downloaded to
// if no path is provided, an empty string resolves to the current working directory