yew/ci/install-wasm-bindgen-cli.sh
WorldSEnder 69e3b5f814
Explicit duplicate key check (#3785)
* explicit duplicate key check in debug_assertions

also a bit more defensive in production code, this should not lead to any slowdown
or changes in code with proper keys

CI changes:

* force install cli tools over cached versions on version mismatch
* Upload PR information for CI
   see also: actions/upload-artifact#618

misc:

* fix panic in panic
   don't set the panic hook if we are already panicking
2024-12-28 17:24:34 +01:00

16 lines
416 B
Bash
Executable File

#!/usr/bin/env bash
if [ ! -f "Cargo.lock" ]; then
cargo fetch
fi
VERSION=$(cargo pkgid --frozen wasm-bindgen | cut -d ":" -f 3)
# Cargo decided to change syntax after 1.61
if [ "$VERSION" = "" ]; then
VERSION=$(cargo pkgid --frozen wasm-bindgen | cut -d "@" -f 2)
fi
if [ "$(wasm-bindgen --version)" != "wasm-bindgen $VERSION" ]; then
cargo +stable install --version "$VERSION" wasm-bindgen-cli --force
fi