Skip to content

Commit

Permalink
Added checksum verification to binaryen installation
Browse files Browse the repository at this point in the history
  • Loading branch information
kubaplas committed Jan 29, 2024
1 parent a9322e1 commit 6a82c98
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
DEVELOPMENT_ODRA_BRANCH := "release/0.8.0"
BINARYEN_VERSION := "version_116"
BINARYEN_CHECKSUM := "c55b74f3109cdae97490faf089b0286d3bba926bb6ea5ed00c8c784fc53718fd"

default:
just --list
Expand All @@ -9,9 +11,10 @@ install:
prepare:
rustup target add wasm32-unknown-unknown
sudo apt install wabt
wget https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz
tar -xzf binaryen-version_116-x86_64-linux.tar.gz
sudo cp binaryen-version_116/bin/wasm-opt /usr/local/bin/wasm-opt
wget https://github.com/WebAssembly/binaryen/releases/download/{{BINARYEN_VERSION}}/binaryen-{{BINARYEN_VERSION}}-x86_64-linux.tar.gz || { echo "Download failed"; exit 1; }
sha256sum binaryen-{{BINARYEN_VERSION}}-x86_64-linux.tar.gz | grep {{BINARYEN_CHECKSUM}} || { echo "Checksum verification failed"; exit 1; }
tar -xzf binaryen-{{BINARYEN_VERSION}}-x86_64-linux.tar.gz || { echo "Extraction failed"; exit 1; }
sudo cp binaryen-{{BINARYEN_VERSION}}/bin/wasm-opt /usr/local/bin/wasm-opt

test-project-generation-on-stable-odra:
rm -rf testproject
Expand Down

0 comments on commit 6a82c98

Please sign in to comment.