scripts: publish

This commit is contained in:
nym21
2026-08-05 18:51:45 +02:00
parent 574af53868
commit 2e7efd4e6a
+17 -1
View File
@@ -1,10 +1,26 @@
#!/bin/bash
set -e
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$SCRIPT_DIR/.."
cd "$ROOT_DIR"
# brk_website embeds ignored assets through symlinks, so Cargo requires
# --allow-dirty even when the Git worktree itself is clean.
cargo release publish --package brk_logger --execute --no-confirm
PUBLISH_LOG=$(mktemp -t brk-rust-publish)
trap 'rm -f "$PUBLISH_LOG"' EXIT
if cargo publish --package brk_website --allow-dirty 2>&1 | tee "$PUBLISH_LOG"; then
:
elif grep -q "already exists on" "$PUBLISH_LOG"; then
echo "brk_website is already published; skipping"
else
exit 1
fi
cargo release publish --workspace --execute --no-confirm
echo "Done!"