-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OV JS] Make download binaries script universal (#27465)
### Details: - Implement **BinaryManager** class that configurable and universal - Extract helpers logic into utils - Make `download-binaries` script short and readable ### Tickets: - 156951 --------- Co-authored-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
- Loading branch information
1 parent
dbc14b2
commit c6cc97c
Showing
6 changed files
with
314 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const { join } = require('node:path'); | ||
|
||
const BinaryManager = require('./lib/binary-manager'); | ||
const packageJson = require('../package.json'); | ||
|
||
if (require.main === module) main(); | ||
|
||
async function main() { | ||
if (!BinaryManager.isCompatible()) process.exit(1); | ||
|
||
const force = process.argv.includes('-f') || process.argv.includes('--force'); | ||
const ignoreIfExists = process.argv.includes('-i') | ||
|| process.argv.includes('--ignore-if-exists'); | ||
|
||
const { env } = process; | ||
const proxy = env.http_proxy || env.HTTP_PROXY || env.npm_config_proxy; | ||
|
||
await BinaryManager.prepareBinary( | ||
join(__dirname, '..'), | ||
packageJson.version, | ||
packageJson.binary, | ||
{ force, ignoreIfExists, proxy }, | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.