ci: testing upload build script

This commit is contained in:
Chubby Granny Chaser 2024-12-10 00:54:35 +00:00
parent 4b93b91373
commit 77e0be8234
No known key found for this signature in database

View File

@ -29,6 +29,7 @@ fs.readdir(dist, async (err, files) => {
files files
.filter((file) => extensionsToUpload.includes(path.extname(file))) .filter((file) => extensionsToUpload.includes(path.extname(file)))
.map(async (file) => { .map(async (file) => {
console.log(`⌛️ Uploading ${file}...`);
const fileName = `${new Date().getTime()}-${file}`; const fileName = `${new Date().getTime()}-${file}`;
const command = new PutObjectCommand({ const command = new PutObjectCommand({
@ -40,7 +41,7 @@ fs.readdir(dist, async (err, files) => {
await s3.send(command); await s3.send(command);
return { return {
url: `${process.env.S3_ENDPOINT}/${process.env.S3_BUILDS_BUCKET_NAME}/${fileName}`, url: `${process.env.BUILDS_URL}/${fileName}`,
name: fileName, name: fileName,
}; };
}) })