Skip to content

Commit

Permalink
Merge pull request #1344 from fitzgen/cranelift-publish-script
Browse files Browse the repository at this point in the history
Re-add Cranelift publish script
  • Loading branch information
fitzgen committed Mar 17, 2020
2 parents 8598295 + 612b806 commit cbd3526
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/contributing-release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
File renamed without changes.
42 changes: 42 additions & 0 deletions scripts/publish-cranelift.sh
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 9 additions & 2 deletions scripts/publish-all.sh → scripts/publish-wasmtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)

0 comments on commit cbd3526

Please sign in to comment.