update script

pull/2868/head
filip mertens 2 years ago
parent 743f1bf065
commit 70885a43d7
  1. 25
      apps/remix-ide/ci/download_e2e_assets.js

@ -1,7 +1,30 @@
const testFolder = './apps/remix-ide-e2e/src/tests/'; const testFolder = './apps/remix-ide-e2e/src/tests/';
const fs = require('fs'); 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 => { fs.readdirSync(testFolder).forEach(file => {
let c = fs.readFileSync(testFolder + file, 'utf8'); let c = fs.readFileSync(testFolder + file, 'utf8');
@ -25,4 +48,4 @@ fs.readdirSync(testFolder).forEach(file => {
} }
} }
}); });

Loading…
Cancel
Save