mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-08-12 10:13:06 -07:00
scripts: publish
This commit is contained in:
+17
-1
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user