Deploy Rust Bedrock from main on the existing host

This commit is contained in:
2026-11-30 00:50:58 +08:00
parent a01bac3a48
commit 351cc156dd
4 changed files with 95 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
output="$PWD/target/bedrock-release"
mkdir -p "$output"
docker run --rm \
--mount "type=bind,source=$PWD,target=/work,readonly" \
--mount "type=bind,source=$output,target=/out" \
-w /work -e CARGO_TARGET_DIR=/tmp/bedrock-target \
rust:1.91.1-bookworm sh -ec '
cargo build --locked --release --bin bedrock
install -m 755 /tmp/bedrock-target/release/bedrock /out/bedrock
'