pull/3668/head^2
filip mertens 2 years ago
parent d065574c51
commit e949e6fb93
  1. 4
      .circleci/config.yml
  2. 36
      apps/remix-ide/ci/download_e2e_assets.js

@ -37,10 +37,10 @@ jobs:
- run: grep -ir "[0-9]+commit" apps/* libs/* --include \*.ts > soljson-versions.txt
- restore_cache:
keys:
- soljson-v4-{{ checksum "soljson-versions.txt" }}
- soljson-v5-{{ checksum "soljson-versions.txt" }}
- run: yarn run downloadsolc_assets_e2e
- save_cache:
key: soljson-v4-{{ checksum "soljson-versions.txt" }}
key: soljson-v5-{{ checksum "soljson-versions.txt" }}
paths:
- dist/apps/remix-ide/assets/js/soljson

@ -10,25 +10,35 @@ if (child.error) {
exit(1);
}
const re = /(?<=soljson).*(?=(.js))/g;
let soljson = child.stdout.match(re);
const nonnightlyre = /v\d*\.\d*\.\d*\+commit\.[\d\w]*/g;
const re2 = /(?<=soljson).*(?=(\'))/g;
let soljson2 = child.stdout.match(re2);
soljson2 = soljson2.filter((item, index) => !item.includes('.js'));
let soljson = child.stdout.match(nonnightlyre);
console.log('non nightly soljson versions found: ', soljson);
// merge the two arrays
const quotedversionre = /\'\d*\.\d*\.\d*\+commit\.[\d\w]*/g;
let soljson2 = child.stdout.match(quotedversionre).map((item) => item.replace('\'', 'v'));
console.log('quoted soljson versions found: ', soljson2);
const nightlyversions = /\d*\.\d*\.\d-nightly.*\+commit\.[\d\w]*/g
let soljson3 = child.stdout.match(nightlyversions).map((item) => 'v' + item);
console.log('nightly soljson versions found: ', soljson3);
// merge the three arrays
soljson = soljson.concat(soljson2);
soljson = soljson.concat(soljson3);
console.log('soljson versions found: ', soljson);
if (soljson) {
// filter out duplicates
//soljson = soljson.filter((item, index) => soljson.indexOf(item) === index);
soljson = soljson.filter((item, index) => soljson.indexOf(item) === index);
// manually add some versions
soljson.push('-v0.6.8+commit.0bbfe453');
soljson.push('-v0.6.0+commit.26b70077');
soljson.push('-v0.7.6+commit.7338295f');
soljson.push('v0.7.6+commit.7338295f');
console.log('soljson versions found: ', soljson);
@ -39,9 +49,9 @@ if (soljson) {
// if nightly
if (version.includes('nightly')) {
url = `https://binaries.soliditylang.org/bin/soljson${version}.js`;
url = `https://binaries.soliditylang.org/bin/soljson-${version}.js`;
}else{
url = `https://binaries.soliditylang.org/wasm/soljson${version}.js`;
url = `https://binaries.soliditylang.org/wasm/soljson-${version}.js`;
}
const dir = './dist/apps/remix-ide/assets/js/soljson';
@ -49,7 +59,7 @@ if (soljson) {
fs.mkdirSync(dir);
}
const path = `./dist/apps/remix-ide/assets/js/soljson/soljson${version}.js`;
const path = `./dist/apps/remix-ide/assets/js/soljson/soljson-${version}.js`;
// check if the file exists
const exists = fs.existsSync(path);
if (!exists) {

Loading…
Cancel
Save