remove ytbn prefix for js and wasm files
This commit is contained in:
parent
aad08d06ab
commit
089aef48ad
9
build.sh
9
build.sh
@ -18,7 +18,7 @@ if test "$1" == "" || test "$1" == "release"; then
|
|||||||
wasm_opt #apply wasm optimizations
|
wasm_opt #apply wasm optimizations
|
||||||
echo "Binary size (pre-strip): $(du -sb pkg/ytbn_graphing_software_bg.wasm)"
|
echo "Binary size (pre-strip): $(du -sb pkg/ytbn_graphing_software_bg.wasm)"
|
||||||
llvm-strip --strip-all pkg/ytbn_graphing_software_bg.wasm
|
llvm-strip --strip-all pkg/ytbn_graphing_software_bg.wasm
|
||||||
elif test "$1" == "debug"; then
|
elif test "$1" == "debug"; then
|
||||||
RUSTFLAGS=--cfg=web_sys_unstable_apis wasm-pack build --target web --debug --no-typescript
|
RUSTFLAGS=--cfg=web_sys_unstable_apis wasm-pack build --target web --debug --no-typescript
|
||||||
else
|
else
|
||||||
echo "ERROR: build.sh, argument invalid"
|
echo "ERROR: build.sh, argument invalid"
|
||||||
@ -39,11 +39,10 @@ wasm_sum=($(md5sum tmp/ytbn_graphing_software_bg.wasm))
|
|||||||
js_sum=($(md5sum tmp/ytbn_graphing_software.js))
|
js_sum=($(md5sum tmp/ytbn_graphing_software.js))
|
||||||
sum=($(echo "$wasm_sum $js_sum" | md5sum))
|
sum=($(echo "$wasm_sum $js_sum" | md5sum))
|
||||||
|
|
||||||
echo $sum
|
echo "sum: $sum"
|
||||||
|
|
||||||
new_wasm_name="ytbn_${sum}.wasm"
|
|
||||||
new_js_name="ytbn_${sum}.js"
|
|
||||||
|
|
||||||
|
new_wasm_name="${sum}.wasm"
|
||||||
|
new_js_name="${sum}.js"
|
||||||
|
|
||||||
|
|
||||||
mv tmp/ytbn_graphing_software_bg.wasm "tmp/${new_wasm_name}"
|
mv tmp/ytbn_graphing_software_bg.wasm "tmp/${new_wasm_name}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user