From 70885a43d71a16a12c3b5fdf1831fa744e8d2216 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Tue, 20 Sep 2022 13:03:10 +0200 Subject: [PATCH] update script --- apps/remix-ide/ci/download_e2e_assets.js | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/ci/download_e2e_assets.js b/apps/remix-ide/ci/download_e2e_assets.js index 412309cd9b..67bfa0ac31 100644 --- a/apps/remix-ide/ci/download_e2e_assets.js +++ b/apps/remix-ide/ci/download_e2e_assets.js @@ -1,7 +1,30 @@ const testFolder = './apps/remix-ide-e2e/src/tests/'; const fs = require('fs'); +let url = 'https://binaries.soliditylang.org/bin/list.json' +let request = require('request'); +request(url, function (error, response, body) { + if (!error && response.statusCode == 200) { + let info = JSON.parse(body); + info.builds = info.builds.filter(build => build.path.indexOf('nightly') === -1) + for (let build of info.builds) { + const buildurl = `https://solc-bin.ethereum.org/bin/${build.path}`; + console.log(buildurl) + + const path = `./dist/apps/remix-ide/assets/js/${build.path}`; + const file = fs.createWriteStream(path); + try { + require('https').get(buildurl, function (response) { + response.pipe(file); + }); + } catch (e) { + console.log('error', buildurl) + } + + } + } +}) fs.readdirSync(testFolder).forEach(file => { let c = fs.readFileSync(testFolder + file, 'utf8'); @@ -25,4 +48,4 @@ fs.readdirSync(testFolder).forEach(file => { } } -}); \ No newline at end of file +});