Browse Source

Merge pull request #970 from alexcrichton/document-release

Document and codify the release process
pull/982/head
Nick Fitzgerald 5 years ago
committed by GitHub
parent
commit
be553aef78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      docs/SUMMARY.md
  2. 25
      docs/contributing-release-process.md
  3. 27
      scripts/bump-wasmtime-version.sh
  4. 26
      scripts/publish-all.sh

1
docs/SUMMARY.md

@ -33,5 +33,6 @@
- [Testing](./contributing-testing.md) - [Testing](./contributing-testing.md)
- [Fuzzing](./contributing-fuzzing.md) - [Fuzzing](./contributing-fuzzing.md)
- [CI](./contributing-ci.md) - [CI](./contributing-ci.md)
- [Release Process](./contributing-release-process.md)
- [Governance](./contributing-governance.md) - [Governance](./contributing-governance.md)
- [Code of Conduct](./contributing-coc.md) - [Code of Conduct](./contributing-coc.md)

25
docs/contributing-release-process.md

@ -0,0 +1,25 @@
# Release Process
This is intended to serve as documentation for wasmtime's release process. It's
largely an internal checklist for those of us performing a wasmtime release, but
others might be curious in this as well!
To kick off the release process someone decides to do a release. Currently
there's not a schedule for releases or something similar. Once the decision is
made (there's also not really a body governing these decisions, it's more
whimsical currently, or on request from others) then the following steps need to
be executed to make the release:
1. `git pull` - make sure you've got the latest changes
2. Update the version numbers in `Cargo.toml` for all crates
* Edit `scripts/bump-wasmtime-version.sh`, notable the `version` variable
* Run the script
* Commit the changes
3. Send this version update as a PR to the wasmtime repository, wait for a merge
4. After merging, tag the merge as `vA.B.C`
5. Push the tag to the repository
* This will trigger the release CI which will create all release artifacts and
publish them to GitHub releases.
6. Run `scripts/publish-all.sh` to publish all crates to crates.io
And that's it, then you've done a wasmtime release.

27
scripts/bump-wasmtime-version.sh

@ -0,0 +1,27 @@
#!/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

26
scripts/publish-all.sh

@ -8,36 +8,10 @@ set -euo pipefail
topdir=$(dirname "$0")/.. topdir=$(dirname "$0")/..
cd "$topdir" cd "$topdir"
# All the wasmtime-* crates have the same version number
version="0.9.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/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\"/" \
{} \;
# Update our local Cargo.lock (not checked in).
cargo update
scripts/test-all.sh
# Commands needed to publish. # Commands needed to publish.
# #
# Note that libraries need to be published in topological order. # Note that libraries need to be published in topological order.
echo git checkout -b bump-version-to-$version
echo git commit -a -m "\"Bump version to $version"\"
echo git tag v$version
echo git push origin bump-version-to-$version
echo "# Don't forget to click the above link to open a pull-request!"
echo git push origin v$version
for cargo_toml in \ for cargo_toml in \
crates/wasi-common/wasi-common-cbindgen/Cargo.toml \ crates/wasi-common/wasi-common-cbindgen/Cargo.toml \
crates/wasi-common/winx/Cargo.toml \ crates/wasi-common/winx/Cargo.toml \

Loading…
Cancel
Save