diff --git a/docs/contributing-release-process.md b/docs/contributing-release-process.md index ee73c166ae..0bf3e5cf39 100644 --- a/docs/contributing-release-process.md +++ b/docs/contributing-release-process.md @@ -22,6 +22,6 @@ be executed to make the release: 1. Push the tag to the repository * This will trigger the release CI which will create all release artifacts and publish them to GitHub releases. -1. Run `scripts/publish-all.sh` to publish all crates to crates.io +1. Run `scripts/publish-wasmtime.sh` to publish all crates to crates.io And that's it, then you've done a Wasmtime release. diff --git a/scripts/cranelift-version.sh b/scripts/bump-cranelift-version.sh similarity index 100% rename from scripts/cranelift-version.sh rename to scripts/bump-cranelift-version.sh diff --git a/scripts/publish-cranelift.sh b/scripts/publish-cranelift.sh new file mode 100755 index 0000000000..da2d290b51 --- /dev/null +++ b/scripts/publish-cranelift.sh @@ -0,0 +1,42 @@ +#!/bin/bash +set -euo pipefail + +# This is a convenience script for maintainers publishing a new version of +# Cranelift to crates.io. To use, first bump the version number by running the +# `scripts/cranelift-version.sh` script, then run this script, and run the +# commands that it prints. +# +# Don't forget to push a git tag for this release! + +topdir=$(dirname "$0")/.. +cd "$topdir" + +# Commands needed to publish. +# +# Note that libraries need to be published in topological order. + +for crate in \ + entity \ + bforest \ + codegen/shared \ + codegen/meta \ + codegen \ + frontend \ + native \ + preopt \ + reader \ + wasm \ + module \ + faerie \ + umbrella \ + simplejit \ + object +do + echo cargo publish --manifest-path "cranelift/$crate/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 + +echo git tag cranelift-v$(grep version cranelift/Cargo.toml | head -n 1 | cut -d '"' -f 2) diff --git a/scripts/publish-all.sh b/scripts/publish-wasmtime.sh similarity index 75% rename from scripts/publish-all.sh rename to scripts/publish-wasmtime.sh index 8cdb2bf8b8..c273bb38f5 100755 --- a/scripts/publish-all.sh +++ b/scripts/publish-wasmtime.sh @@ -2,12 +2,17 @@ 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. +# Wasmtime to crates.io. To use, first bump the Wasmtime versions with +# `scripts/bump-wasmtime-version.sh` and Cranelift versions with +# `scripts/bump-cranelift-version.sh`, then run this script, and run the +# commands that it prints. topdir=$(dirname "$0")/.. cd "$topdir" +# Publishing Wasmtime requires publishing any local Cranelift changes. +./publish-cranelift.sh + # Commands needed to publish. # # Note that libraries need to be published in topological order. @@ -43,3 +48,5 @@ for cargo_toml in \ # https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608 echo sleep 10 done + +echo echo git tag v$(grep "version =" Cargo.toml | head -n 1 | cut -d '"' -f 2)