/ scripts / publish-all.sh
publish-all.sh
 1  #!/usr/bin/env bash
 2  set -euo pipefail
 3  
 4  # Publish all workspace crates to crates.io in dependency order.
 5  # Waits 160 seconds between each publish for crates.io indexing.
 6  
 7  WAIT_SECS=160
 8  
 9  # Dependency-ordered list (foundations first, leaves last).
10  # Skipped: auths-test-utils, xtask (publish = false)
11  # Skipped: auths-radicle (depends on unpublished radicle-core/radicle-crypto)
12  # Skipped: auths-mobile-ffi (UniFFI mobile bindings, not a library crate)
13  CRATES=(
14    auths
15    auths-crypto
16    auths-index
17    auths-policy
18    auths-telemetry
19    auths-verifier
20    auths-core
21    auths-infra-http
22    auths-id
23    auths-sdk
24    auths-storage
25    auths-infra-git
26    auths-cli
27  )
28  
29  TOTAL=${#CRATES[@]}
30  
31  for i in "${!CRATES[@]}"; do
32    crate="${CRATES[$i]}"
33    num=$((i + 1))
34  
35    echo ""
36    echo "[$num/$TOTAL] Publishing $crate..."
37    echo ""
38  
39    cargo publish -p "$crate"
40  
41    if [ "$num" -lt "$TOTAL" ]; then
42      echo ""
43      echo "Waiting ${WAIT_SECS}s for crates.io to index $crate..."
44      sleep "$WAIT_SECS"
45    fi
46  done
47  
48  echo ""
49  echo "All $TOTAL crates published."