download auto

pull/2868/head
filip mertens 2 years ago
parent a4aa56e209
commit 743f1bf065
  1. 28
      apps/remix-ide/ci/download_e2e_assets.js
  2. 15
      apps/remix-ide/ci/download_e2e_assets.sh
  3. 2
      package.json

@ -0,0 +1,28 @@
const testFolder = './apps/remix-ide-e2e/src/tests/';
const fs = require('fs');
fs.readdirSync(testFolder).forEach(file => {
let c = fs.readFileSync(testFolder + file, 'utf8');
const re = /(?<=soljson).*(?=(.js))/g;
const soljson = c.match(re);
if (soljson) {
for (let i = 0; i < soljson.length; i++) {
const version = soljson[i];
if(version) {
const url = `https://solc-bin.ethereum.org/bin/soljson${version}.js`;
console.log(url)
const path = `./dist/apps/remix-ide/assets/js/soljson${version}.js`;
const file = fs.createWriteStream(path);
require('https').get(url, function (response) {
response.pipe(file);
});
}
}
}
});

@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -e
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.8.7+commit.e28d00a7.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.8.7+commit.e28d00a7.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.8.16+commit.07a7930e.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.8.16+commit.07a7930e.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.8.15+commit.e14f2714.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.8.15+commit.e14f2714.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.7.4+commit.3f05b770.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.7.4+commit.3f05b770.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.4.14+commit.c2215d46.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.4.14+commit.c2215d46.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.6.8+commit.0bbfe453.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.6.8+commit.0bbfe453.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.8.1+commit.df193b15.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.8.1+commit.df193b15.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.6.5+commit.f956cc89.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.6.5+commit.f956cc89.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js
wget --no-check-certificate https://binaries.soliditylang.org/bin/soljson-v0.6.12+commit.27d51765.js -O ./dist/apps/remix-ide/assets/js/soljson-v0.6.12+commit.27d51765.js

@ -54,7 +54,7 @@
"bumpVersion:libs": "gulp & gulp syncLibVersions;",
"browsertest": "sleep 5 && yarn run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/src/assets/css/font-awesome.min.css' apps/remix-ide/src/assets/css/",
"downloadsolc_assets_e2e": "sh ./apps/remix-ide/ci/download_e2e_assets.sh",
"downloadsolc_assets_e2e": "node ./apps/remix-ide/ci/download_e2e_assets.js",
"downloadsolc_assets": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/remix-ide/src/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./apps/solidity-compiler/src/assets/js/soljson.js",
"downloadsolc_assets_dist": "wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./dist/apps/remix-ide/assets/js/soljson.js && wget --no-check-certificate https://binaries.soliditylang.org/wasm/soljson-v0.8.7+commit.e28d00a7.js -O ./dist/apps/solidity-compiler/assets/js/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",

Loading…
Cancel
Save