Skip to content

Commit cbd3526

Browse files
authored
Merge pull request #1344 from fitzgen/cranelift-publish-script
Re-add Cranelift publish script
2 parents 8598295 + 612b806 commit cbd3526

File tree

4 files changed

+52
-3
lines changed

4 files changed

+52
-3
lines changed

docs/contributing-release-process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ be executed to make the release:
2222
1. Push the tag to the repository
2323
* This will trigger the release CI which will create all release artifacts and
2424
publish them to GitHub releases.
25-
1. Run `scripts/publish-all.sh` to publish all crates to crates.io
25+
1. Run `scripts/publish-wasmtime.sh` to publish all crates to crates.io
2626

2727
And that's it, then you've done a Wasmtime release.

scripts/publish-cranelift.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# This is a convenience script for maintainers publishing a new version of
5+
# Cranelift to crates.io. To use, first bump the version number by running the
6+
# `scripts/cranelift-version.sh` script, then run this script, and run the
7+
# commands that it prints.
8+
#
9+
# Don't forget to push a git tag for this release!
10+
11+
topdir=$(dirname "$0")/..
12+
cd "$topdir"
13+
14+
# Commands needed to publish.
15+
#
16+
# Note that libraries need to be published in topological order.
17+
18+
for crate in \
19+
entity \
20+
bforest \
21+
codegen/shared \
22+
codegen/meta \
23+
codegen \
24+
frontend \
25+
native \
26+
preopt \
27+
reader \
28+
wasm \
29+
module \
30+
faerie \
31+
umbrella \
32+
simplejit \
33+
object
34+
do
35+
echo cargo publish --manifest-path "cranelift/$crate/Cargo.toml"
36+
37+
# Sleep for a few seconds to allow the server to update the index.
38+
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
39+
echo sleep 10
40+
done
41+
42+
echo git tag cranelift-v$(grep version cranelift/Cargo.toml | head -n 1 | cut -d '"' -f 2)
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
set -euo pipefail
33

44
# This is a convenience script for maintainers publishing a new version of
5-
# Wasmtime to crates.io. To use, bump the version number below, run the
6-
# script, and then run the commands that the script prints.
5+
# Wasmtime to crates.io. To use, first bump the Wasmtime versions with
6+
# `scripts/bump-wasmtime-version.sh` and Cranelift versions with
7+
# `scripts/bump-cranelift-version.sh`, then run this script, and run the
8+
# commands that it prints.
79

810
topdir=$(dirname "$0")/..
911
cd "$topdir"
1012

13+
# Publishing Wasmtime requires publishing any local Cranelift changes.
14+
./publish-cranelift.sh
15+
1116
# Commands needed to publish.
1217
#
1318
# Note that libraries need to be published in topological order.
@@ -43,3 +48,5 @@ for cargo_toml in \
4348
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
4449
echo sleep 10
4550
done
51+
52+
echo echo git tag v$(grep "version =" Cargo.toml | head -n 1 | cut -d '"' -f 2)

0 commit comments

Comments
 (0)