kanidm/platform/debian/fix_wasm_opt.sh
James Hodgkinson b249747e55
.deb packaging config and scripting (#920)
* working on debian builds again
* github actions tweaks
* fixed a ref in the build script
* updating makefile targets to include build profile env
* updates to docs and makefiles
2022-07-20 17:21:40 +10:00

22 lines
660 B
Bash
Executable file

#!/bin/bash
# This is a hack to work around the fact that wasm-opt isn't available on
# Linux + aarch64
if [ "$(uname -m)" = "aarch64" ] && [ "$(uname -s)" = "Linux" ]; then
echo "#####################################"
echo " WASM-OPT NOT AVAILABLE"
echo ""
echo " Large WASM ahead."
echo "#####################################"
if [ "$(grep -oE 'wasm-opt.*' kanidmd_web_ui/Cargo.toml | awk '{print $NF}')" != "false" ]; then
echo "Updating kanidmd_web_ui/Cargo.toml to disable wasm-opt"
cat >> kanidmd_web_ui/Cargo.toml <<-EOM
[package.metadata.wasm-pack.profile.release]
wasm-opt = false
EOM
fi
fi