From cd833cde6fd781f9f77a70d474a3c74ff444d58b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Tue, 2 May 2023 13:44:05 +0200 Subject: [PATCH] optimize --- apps/remix-ide/ci/download_e2e_assets.js | 4 +++- apps/remix-ide/ci/downloadsoljson.sh | 5 +++-- apps/remix-ide/project.json | 1 + apps/remix-ide/webpack.config.js | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/ci/download_e2e_assets.js b/apps/remix-ide/ci/download_e2e_assets.js index a5343d5335..2c005056a3 100644 --- a/apps/remix-ide/ci/download_e2e_assets.js +++ b/apps/remix-ide/ci/download_e2e_assets.js @@ -2,8 +2,10 @@ const fs = require('fs'); var child_process = require('child_process'); const { exit } = require('process'); -var child = child_process.spawnSync('grep', ['-ir', '[0-9]+commit', 'libs/**/*', 'apps/**/*', '--include', '*.ts', '--include', '*.tsx'], { encoding: 'utf8', cwd: process.cwd(), shell: true }); +const child = child_process.spawnSync('grep', ['-ir', '[0-9]+commit', 'libs/**/*', 'apps/**/*', '--include', '*.ts', '--include', '*.tsx'], { encoding: 'utf8', cwd: process.cwd(), shell: true }); +const child2 = child_process.spawnSync('grep -r --include="*.json" "+commit" ', [], { encoding: 'utf8', cwd: process.cwd(), shell: true }); +console.log('child: ', child2); if (child.error) { console.log("ERROR: ", child); exit(1); diff --git a/apps/remix-ide/ci/downloadsoljson.sh b/apps/remix-ide/ci/downloadsoljson.sh index 5fdbfddf39..b99ed2d6b0 100644 --- a/apps/remix-ide/ci/downloadsoljson.sh +++ b/apps/remix-ide/ci/downloadsoljson.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash +echo "Downloading latest soljson.js from https://binaries.soliditylang.org/wasm/list.json" set -e # check if curl is installed if ! command -v curl &> /dev/null @@ -10,7 +11,7 @@ fi # download https://binaries.soliditylang.org/wasm/list.json as json -curl https://binaries.soliditylang.org/wasm/list.json > list.json +curl -s https://binaries.soliditylang.org/wasm/list.json > list.json # get the latest version without jq latest=$(grep 'latestRelease' list.json | cut -d '"' -f 4) echo "latest version: $latest" @@ -20,7 +21,7 @@ echo "url: $url" path="https://binaries.soliditylang.org/bin/$url" echo "path: $path" # download the file to ./apps/remix-ide/src/assets/js/soljson.js -curl $path > ./apps/remix-ide/src/assets/js/soljson.js +curl -s $path > ./apps/remix-ide/src/assets/js/soljson.js # if directory ./apps/remix-ide/src/assets/js/soljson does not exist, create it if [ ! -d "./apps/remix-ide/src/assets/js/soljson" ]; then mkdir ./apps/remix-ide/src/assets/js/soljson diff --git a/apps/remix-ide/project.json b/apps/remix-ide/project.json index 4e413240ee..15636c7961 100644 --- a/apps/remix-ide/project.json +++ b/apps/remix-ide/project.json @@ -52,6 +52,7 @@ "configurations": { "development": { "buildTarget": "remix-ide:build:development", + "host": "0.0.0.0", "port": 8080 }, "hot":{ diff --git a/apps/remix-ide/webpack.config.js b/apps/remix-ide/webpack.config.js index 3191b1d886..a6aa923939 100644 --- a/apps/remix-ide/webpack.config.js +++ b/apps/remix-ide/webpack.config.js @@ -17,6 +17,8 @@ const versionData = { const loadLocalSolJson = async () => { // execute apps/remix-ide/ci/downloadsoljson.sh const child = require('child_process').execSync('bash ./apps/remix-ide/ci/downloadsoljson.sh', { encoding: 'utf8', cwd: process.cwd(), shell: true }) + // show output + console.log(child) } fs.writeFileSync('./apps/remix-ide/src/assets/version.json', JSON.stringify(versionData))