Skip to content

Commit

Permalink
Backup files to make sed work on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
slumber committed Mar 9, 2021
1 parent 278e0e7 commit 79af1bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sdk/zksync-crypto/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ wasm-pack build --release --target=bundler --out-name=zksync-crypto-bundler --ou
cp ./dist/zksync-crypto-bundler.js ./dist/zksync-crypto-bundler_asm.js

# fix imports for asm
sed -i "s/^import.*/\
sed -i.backup "s/^import.*/\
let wasm = require('.\/zksync-crypto-bundler_bg_asm.js');/" ./dist/zksync-crypto-bundler_asm.js
sed -i "s/\.js/_asm\.js/g" $ASM
sed -i.backup "s/\.js/_asm\.js/g" $ASM

# pack for browser
wasm-pack build --release --target=web --out-name=zksync-crypto-web --out-dir=dist

# pack for node.js
wasm-pack build --release --target=nodejs --out-name=zksync-crypto-node --out-dir=dist

rm dist/package.json dist/.gitignore
rm dist/*.backup

0 comments on commit 79af1bf

Please sign in to comment.