From 42b0d7a17456bccbe67b408d46813786db51a9cd Mon Sep 17 00:00:00 2001 From: nym21 Date: Sun, 21 Dec 2025 13:37:58 +0100 Subject: [PATCH] scripts: improve publish --- scripts/publish.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 371c9ccfb..d3194ea46 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -35,10 +35,16 @@ echo "Working from: $(pwd)" for crate in "${CRATES[@]}"; do cd "$crate" - cargo publish + cargo publish --color=always 2>&1 | tee /tmp/publish_$$.log + if [ ${PIPESTATUS[0]} -ne 0 ]; then + if ! grep -q "already exists on" /tmp/publish_$$.log; then + rm -f /tmp/publish_$$.log + exit 1 + fi + fi + rm -f /tmp/publish_$$.log cd .. echo "" - sleep 10 done echo "Done!"