The `wasmtime` release procees seems like it's been a bit ad-hoc up to this point, so I figured it'd be good to try to document what we do today and codify what should be done as well as a form of release checklist. I've noticed that we have a number of releases (like v0.11.0) but the `Cargo.toml` files in the repository don't reflect the current version of `wasmtime`. Additionally I've noticed that the [most recent release] ended up having failed tests because `Cargo.toml` was modified but `Cargo.lock` wasn't updated. I'm hoping that by having a checklist we can avoid these sorts of accidental issues in the future! [release]: https://github.com/bytecodealliance/wasmtime/runs/434690272
28 lines
920 B
Bash
Executable File
28 lines
920 B
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.10.0"
|
|
|
|
# Update the version numbers of the crates to $version.
|
|
echo "Updating crate versions to $version"
|
|
find -name Cargo.toml \
|
|
-not -path ./crates/wasi-common/wig/WASI/tools/witx/Cargo.toml \
|
|
-exec sed -i.bk -e "s/^version = \"[[:digit:]].*/version = \"$version\"/" {} \;
|
|
|
|
# Update the required version numbers of path dependencies.
|
|
find -name Cargo.toml \
|
|
-not -path ./crates/wasi-common/wig/WASI/tools/witx/Cargo.toml \
|
|
-exec sed -i.bk \
|
|
-e "/\> *= *{.*\<path *= *\"/s/version = \"[^\"]*\"/version = \"$version\"/" \
|
|
{} \;
|
|
|
|
cargo build
|