* Move back to only one WASI submodule This commit fixes the issue where we have two WASI submodules for build reasons in this repository. The fix was to place the submodule in the `wasi-common` crate, and then anyone using the `wig` crate has to be sure to define a `WASI_ROOT` env var in a build script to be able to parse witx files. With all that in place `wasi-common` becomes the source of truth for the witx files we're parsing, and crates like `wasmtime-wasi` use build-scripts shenanigans to read the same witx files. This should hopefully get us so we're compatible with publishing and still only have one submodule! * rustfmt
31 lines
930 B
Bash
Executable File
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.61.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
|