Skip to content

Commit

Permalink
release-scriopt upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Swen committed Jul 23, 2024
1 parent 43bcac1 commit ac02724
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scripts/release-all-rust-crates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ echo "Tagging and releasing all Rust projects..."
echo "Logging in to crates.io..."
cargo login "${CRATES_IO_TOKEN}"
# TODO: allow dynamic releases, and add gh release workflow
PACKAGES=("aligned-sized" "light-heap" "light-bounded-vec" "light-utils" "light-hasher" "light-macros" "light-hash-set" "light-merkle-tree-reference" "light-concurrent-merkle-tree" "light-indexed-merkle-tree" "light-prover-client" "light-verifier" "account-compression" "light-registry" "light-system-program" "light-compressed-token" "light-test-utils")
PACKAGES=("light-test-utils")
PACKAGES=("aligned-sized" "light-heap" "light-bounded-vec" "light-utils" "light-hasher" "light-macros" "light-hash-set" "light-merkle-tree-reference" "light-concurrent-merkle-tree" "light-indexed-merkle-tree" "light-prover-client" "light-verifier" "account-compression" "light-registry" "light-system-program" "light-compressed-token" "light-test-utils" "light-sdk")
# PACKAGES=("light-test-utils")
for PACKAGE in "${PACKAGES[@]}"; do
PKG_VERSION=$(cargo pkgid -p "$PACKAGE" | cut -d "#" -f2)
VERSION=${PKG_VERSION#*@}
Expand All @@ -22,9 +22,7 @@ for PACKAGE in "${PACKAGES[@]}"; do
git push origin "${PACKAGE}-v${VERSION}"
for attempt in {1..3}; do
echo "Attempt $attempt: Publishing $PACKAGE..."
cargo release publish --package "$PACKAGE" --execute --no-confirm && break || echo "Attempt $attempt failed, retrying in 60..."
sleep 60
cargo release publish --package "$PACKAGE" --execute --no-confirm && break || echo "Attempt $attempt failed, retrying in 20..."
sleep 20
done
echo "Sleeping for 60 seconds to handle rate limits..."
sleep 60
done

0 comments on commit ac02724

Please sign in to comment.