Files
wasmtime/scripts/bump-cranelift-version.sh
Dan Gohman fde5ddf159 Fixes for 0.15 (#1449)
* Wasmtime 0.15.0 and Cranelift 0.62.0. (#1398)

* Bump more ad-hoc versions.

* Add build.rs to wasi-common's Cargo.toml.

* Update the env var name in more places.

* Remove a redundant echo.
2020-04-03 13:13:37 -07:00

31 lines
930 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
# This is a convenience script for maintainers changing a cranelift
# dependencies versions. To use, bump the version number below, run the
# script.
topdir=$(dirname "$0")/..
cd "$topdir"
# All the cranelift-* crates have the same version number
version="0.62.0"
# Update all of the Cargo.toml files.
echo "Updating crate versions to $version"
for toml in cranelift/Cargo.toml cranelift/*/Cargo.toml cranelift/*/*/Cargo.toml; do
# Update the version number of this crate to $version.
sed -i.bk -e "/^version = /s/\"[^\"]*\"/\"$version\"/" \
"$toml"
done
# Update the required version numbers of path dependencies.
find -name Cargo.toml \
-not -path ./crates/wasi-common/WASI/tools/witx/Cargo.toml \
-exec sed -i.bk \
-e "/^cranelift/s/version = \"[^\"]*\"/version = \"$version\"/" \
{} \;
# Update the Cargo.lock file for the new versions.
cargo update