From 311b4d5ab6788db9ce21a06034b14d23f2bf88b2 Mon Sep 17 00:00:00 2001 From: frami Date: Mon, 8 May 2023 13:19:14 -0300 Subject: [PATCH] chore: improve prepare-artifacts.js (#174) * chore: improve prepare-artifacts.js * chore: upgrade version --------- Signed-off-by: frami --- package.json | 2 +- scripts/prepare-artifacts.js | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index b52e210..b480e99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "explorer-desktop-launcher", - "version": "0.1.49", + "version": "0.1.50", "author": "decentraland", "description": "Decentraland Desktop Launcher", "homepage": ".", diff --git a/scripts/prepare-artifacts.js b/scripts/prepare-artifacts.js index a05ce20..4603822 100644 --- a/scripts/prepare-artifacts.js +++ b/scripts/prepare-artifacts.js @@ -8,20 +8,23 @@ if (!fs.existsSync(dir)) { } function copyFileSync(src, dest, mode) { - console.log('coping', src, 'to', dest) - fs.copyFileSync(src, dest, mode) + if (fs.existsSync(src)) { + console.log('coping', src, 'to', dest) + fs.copyFileSync(src, dest, mode) + } else { + console.log('skipping', src, `(don't exist)`) + } } if (ext === 'exe') { - if (fs.existsSync(`dist/Install Decentraland.${ext}`)) { - copyFileSync(`dist/Install Decentraland.${ext}`, `output/Install-Decentraland.${ext}`) - } - - if (fs.existsSync(`dist/Decentraland.appx`)) { - copyFileSync(`dist/Decentraland.appx`, `output/Decentraland.appx`) - } + copyFileSync(`dist/Install Decentraland.${ext}`, `output/Install-Decentraland.${ext}`) + copyFileSync(`dist/Install Decentraland.${ext}.blockmap`, `output/Install-Decentraland.${ext}.blockmap`) + copyFileSync(`dist/Decentraland.appx`, `output/Decentraland.appx`) } else { copyFileSync(`dist/Decentraland.${ext}`, `output/Decentraland.${ext}`) + copyFileSync(`dist/Decentraland.${ext}.blockmap`, `output/Decentraland.${ext}.blockmap`) } +copyFileSync(`dist/latest.yml`, `output/latest.yml`) + console.log('Done')