Skip to content

Commit

Permalink
build: Fix release scripts
Browse files Browse the repository at this point in the history
The release scripts were broken by moving `prost` crate into a separated directory in tokio-rs#1033.

fixes tokio-rs#1054
  • Loading branch information
caspermeijn committed May 10, 2024
1 parent 26405ab commit c1f1e94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ sed -i -E "s/${PROST_CRATE_MATCHER} = \"${VERSION_MATCHER}\"/\1 = \"${MINOR}\"/"

# Update html_root_url attributes.
sed -i -E "s~html_root_url = \"https://docs\.rs/${PROST_CRATE_MATCHER}/$VERSION_MATCHER\"~html_root_url = \"https://docs.rs/\1/${VERSION}\"~" \
"$DIR/src/lib.rs" \
"$DIR/prost/src/lib.rs" \
"$DIR/prost-derive/src/lib.rs" \
"$DIR/prost-build/src/lib.rs" \
"$DIR/prost-types/src/lib.rs"

# Update Cargo.toml version fields.
sed -i -E "s/^version = \"${VERSION_MATCHER}\"$/version = \"${VERSION}\"/" \
"$DIR/Cargo.toml" \
"$DIR/prost/Cargo.toml" \
"$DIR/prost-derive/Cargo.toml" \
"$DIR/prost-build/Cargo.toml" \
"$DIR/prost-types/Cargo.toml"

# Update Cargo.toml dependency versions.
sed -i -E "s/^${PROST_CRATE_MATCHER} = \{ version = \"${VERSION_MATCHER}\"/\1 = { version = \"${VERSION}\"/" \
"$DIR/Cargo.toml" \
"$DIR/prost/Cargo.toml" \
"$DIR/prost-derive/Cargo.toml" \
"$DIR/prost-build/Cargo.toml" \
"$DIR/prost-types/Cargo.toml"
Expand Down
4 changes: 2 additions & 2 deletions publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

CRATES=( \
"prost-derive" \
"." \
"prost" \
"prost-types" \
"prost-build" \
)
Expand All @@ -24,7 +24,7 @@ for CRATE in "${CRATES[@]}"; do

echo "Publishing $CRATE"

cargo publish
cargo publish --dry-run

echo "Sleeping 5 seconds...for the release to be visible"
sleep 5
Expand Down

0 comments on commit c1f1e94

Please sign in to comment.