forked from radixdlt/radixdlt-scrypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-assets.sh
executable file
·36 lines (29 loc) · 980 Bytes
/
update-assets.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -x
set -e
# We use a globally loaded scrypto CLI so that this script works even if the code doesn't compile at present
# It's also a little faster. If you wish to use the local version instead, swap out the below line.
# scrypto="cargo run --manifest-path $PWD/simulator/Cargo.toml --bin scrypto $@ --"
scrypto="scrypto"
cd "$(dirname "$0")/assets/blueprints"
echo "Building packages..."
(cd account; $scrypto build)
(cd faucet; $scrypto build)
echo "Publishing artifacts..."
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../account.wasm \
./target/wasm32-unknown-unknown/release/account.wasm
cp \
./target/wasm32-unknown-unknown/release/account.abi \
../account.abi
npx [email protected] \
-Os -g \
--strip-debug --strip-dwarf --strip-producers \
-o ../faucet.wasm \
./target/wasm32-unknown-unknown/release/faucet.wasm
cp \
./target/wasm32-unknown-unknown/release/faucet.abi \
../faucet.abi
echo "Done!"