Skip to content

Commit

Permalink
refactor(Release): Prebuild binaries must be hosted inside lib folder
Browse files Browse the repository at this point in the history
When downloading the prebuild binaries as part of the post install hook, these prebuild binaries
must be hosted inside the lib directory together with the compiled source code.
  • Loading branch information
brikendr committed Sep 11, 2019
1 parent a0adc1f commit 7587768
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/download-binaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,19 @@ function downloadBinary(platform, arch, abiName, destFile, gitsha) {
});
}

const prebuildsDir = path.join(__dirname, '../', 'prebuilds');
/**
* Create `lib` folder in root directory if it doesn't exist
*/
const libDir = path.join(__dirname, '../', 'lib');
if (!fs.existsSync(libDir)) {
fs.mkdirSync(libDir);
}

/**
* The prebuilds directory must be hosted inside `lib` directory together with the
* compiled source code.
*/
const prebuildsDir = path.join(libDir, 'prebuilds');
if (!fs.existsSync(prebuildsDir)) {
fs.mkdirSync(prebuildsDir);
}
Expand Down

0 comments on commit 7587768

Please sign in to comment.