do not use jq

pull/3668/head^2
filip mertens 2 years ago
parent 0abb2e793f
commit 6a54ff53c5
  1. 16
      apps/remix-ide/ci/downloadsoljson.sh

@ -11,16 +11,16 @@ fi
# download https://binaries.soliditylang.org/wasm/list.json as json # download https://binaries.soliditylang.org/wasm/list.json as json
curl https://binaries.soliditylang.org/wasm/list.json > list.json curl https://binaries.soliditylang.org/wasm/list.json > list.json
# get the latest version # get the latest version without jq
version=$(cat list.json | npx jq -r '.latestRelease') latest=$(grep 'latestRelease' list.json | cut -d '"' -f 4)
echo $version echo "latest version: $latest"
# the value of releases with key $version # get url
url=$(cat list.json | npx jq -r '.releases[]' | grep "$version+") url=$(grep "\"$latest\":" list.json | cut -d '"' -f 4)
echo $url echo "url: $url"
# set path to the url
path="https://binaries.soliditylang.org/bin/$url" path="https://binaries.soliditylang.org/bin/$url"
echo $path echo "path: $path"
# download the file to ./apps/remix-ide/src/assets/js/soljson.js # download the file to ./apps/remix-ide/src/assets/js/soljson.js
curl $path > ./apps/remix-ide/src/assets/js/soljson.js curl $path > ./apps/remix-ide/src/assets/js/soljson.js
# remove list.json # remove list.json
rm list.json rm list.json

Loading…
Cancel
Save