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

Loading…
Cancel
Save