Files
wasmtime/scripts/publish-all.sh
Alex Crichton 12cff023b6 Document and codify the release process
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
2020-02-24 10:46:50 -08:00

46 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"
# Commands needed to publish.
#
# Note that libraries need to be published in topological order.
for cargo_toml in \
crates/wasi-common/wasi-common-cbindgen/Cargo.toml \
crates/wasi-common/winx/Cargo.toml \
crates/wasi-common/wig/Cargo.toml \
crates/wasi-common/Cargo.toml \
crates/lightbeam/Cargo.toml \
crates/environ/Cargo.toml \
crates/obj/Cargo.toml \
crates/runtime/Cargo.toml \
crates/debug/Cargo.toml \
crates/jit/Cargo.toml \
crates/api/Cargo.toml \
crates/wasi/Cargo.toml \
crates/wast/Cargo.toml \
crates/interface-types/Cargo.toml \
crates/misc/py/Cargo.toml \
crates/misc/rust/macro/Cargo.toml \
crates/misc/rust/Cargo.toml \
; do
version=""
case $cargo_toml in
crates/lightbeam/Cargo.toml) version=" +nightly" ;;
crates/misc/py/Cargo.toml) version=" +nightly" ;;
esac
echo cargo$version publish --manifest-path "$cargo_toml"
# Sleep for a few seconds to allow the server to update the index.
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
echo sleep 10
done