Skip to content

Commit

Permalink
chore: improve prepare-artifacts.js (#174)
Browse files Browse the repository at this point in the history
* chore: improve prepare-artifacts.js

* chore: upgrade version

---------

Signed-off-by: frami <[email protected]>
  • Loading branch information
2fd authored May 8, 2023
1 parent 82e1b39 commit 311b4d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "explorer-desktop-launcher",
"version": "0.1.49",
"version": "0.1.50",
"author": "decentraland",
"description": "Decentraland Desktop Launcher",
"homepage": ".",
Expand Down
21 changes: 12 additions & 9 deletions scripts/prepare-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 311b4d5

Please sign in to comment.