Update publish-all.sh for new paths.
This commit is contained in:
10
scripts/cargo-chill.sh
Executable file
10
scripts/cargo-chill.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# This is a trivial wrapper around cargo which just forwards its arguments
|
||||
# to cargo, and then sleeps for a few seconds, to allow for exteral services
|
||||
# to update their indices.
|
||||
# https://internals.rust-lang.org/t/changes-to-how-crates-io-handles-index-updates/9608
|
||||
|
||||
cargo "$@"
|
||||
sleep 10
|
||||
@@ -5,7 +5,7 @@ set -euo pipefail
|
||||
# dependencies versions. To use, bump the version number below, run the
|
||||
# script.
|
||||
|
||||
topdir=$(dirname "$0")
|
||||
topdir=$(dirname "$0")/..
|
||||
cd "$topdir"
|
||||
|
||||
# All the cranelift-* crates have the same version number
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
|
||||
# Format all sources using rustfmt.
|
||||
|
||||
topdir=$(dirname "$0")
|
||||
topdir=$(dirname "$0")/..
|
||||
cd "$topdir"
|
||||
|
||||
# Make sure we can find rustfmt.
|
||||
|
||||
@@ -5,29 +5,19 @@ set -euo pipefail
|
||||
# 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")
|
||||
topdir=$(dirname "$0")/..
|
||||
cd "$topdir"
|
||||
|
||||
# All the wasmtime-* crates have the same version number
|
||||
version="0.2.0"
|
||||
|
||||
# Update all of the Cargo.toml files.
|
||||
#
|
||||
# The main Cargo.toml in the top-level directory is the wasmtime crate which we don't publish.
|
||||
# Update the version numbers of the crates to $version.
|
||||
echo "Updating crate versions to $version"
|
||||
for crate in . wasmtime-*; do
|
||||
# Update the version number of this crate to $version.
|
||||
sed -i.bk -e "s/^version = .*/version = \"$version\"/" \
|
||||
"$crate/Cargo.toml"
|
||||
|
||||
# Update the required version number of any wasmtime* dependencies.
|
||||
sed -i.bk -e "/^wasmtime/s/version = \"[^\"]*\"/version = \"$version\"/" \
|
||||
"$crate/Cargo.toml"
|
||||
done
|
||||
find -name Cargo.toml -exec sed -i.bk -e "s/^version = .*/version = \"$version\"/" {} \;
|
||||
|
||||
# Update our local Cargo.lock (not checked in).
|
||||
cargo update
|
||||
./scripts/test-all.sh
|
||||
scripts/test-all.sh
|
||||
|
||||
# Commands needed to publish.
|
||||
#
|
||||
@@ -37,25 +27,4 @@ echo git commit -a -m "\"Bump version to $version"\"
|
||||
echo git tag v$version
|
||||
echo git push
|
||||
echo git push origin v$version
|
||||
for crate in \
|
||||
wasmtime-environ \
|
||||
wasmtime-debug \
|
||||
wasmtime-runtime \
|
||||
wasmtime-jit \
|
||||
wasmtime-wast \
|
||||
wasmtime-wasi \
|
||||
wasmtime-wasi-c \
|
||||
wasmtime-interface-types \
|
||||
wasmtime-obj \
|
||||
wasmtime-py \
|
||||
wasmtime-rust \
|
||||
wasmtime-cli \
|
||||
wasi-common \
|
||||
wasmtime
|
||||
do
|
||||
echo cargo publish --manifest-path "$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 "find -name Cargo.toml -exec scripts/cargo-chill.sh publish --manifest-path {} \\;"
|
||||
|
||||
@@ -13,7 +13,7 @@ set -euo pipefail
|
||||
# All tests run by this script should be passing at all times.
|
||||
|
||||
# Repository top-level directory.
|
||||
topdir=$(dirname "$0")
|
||||
topdir=$(dirname "$0")/..
|
||||
cd "$topdir"
|
||||
|
||||
function banner {
|
||||
|
||||
Reference in New Issue
Block a user