Files
wasmtime/scripts/bump-wasmtime-version.sh
Alex Crichton 968cd76163 Move back to only one WASI submodule (#1434)
* 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
2020-03-30 14:45:23 -05:00

41 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
# This is a convenience script for maintainers publishing a new version of
# Wasmtime to crates.io. To use, bump the version number below, run the
# script, and then run the commands that the script prints.
topdir=$(dirname "$0")/..
cd "$topdir"
# All the wasmtime-* crates have the same version number
version="0.14.0"
# Update the version numbers of the crates to $version. Skip crates with
# a version of "0.0.0", which are unpublished.
echo "Updating crate versions to $version"
find crates -name Cargo.toml \
-not -path crates/wasi-common/WASI/tools/witx/Cargo.toml \
-exec sed -i.bk -e "s/^version = \"[.*[^0.].*\"$/version = \"$version\"/" {} \;
# Updat the top-level Cargo.toml too.
sed -i.bk -e "s/^version = \"[.*[^0.].*\"$/version = \"$version\"/" Cargo.toml
# 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 "/^\(wasmtime\|wiggle\)/s/version = \"[^\"]*\"/version = \"$version\"/" \
{} \;
find -name Cargo.toml \
-not -path ./crates/wasi-common/WASI/tools/witx/Cargo.toml \
-exec sed -i.bk \
-e "/^\(wasi-common\|wig\|yanix\|winx\|lightbeam\) = /s/version = \"[^\"]*\"/version = \"$version\"/" \
{} \;
# Update the Cargo.lock files for the new versions.
cargo update
cd crates/test-programs/wasi-tests
cargo update
cd - >/dev/null