release: ship monero-wallet-rpc beside the binary
This commit is contained in:
parent
a9a589d2d1
commit
b60a9dcb1a
2 changed files with 108 additions and 24 deletions
|
|
@ -15,6 +15,17 @@ target=x86_64-unknown-linux-gnu
|
|||
root="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$root"
|
||||
|
||||
# The bundled wallet RPC — the official Monero release binary for this target,
|
||||
# not something built here (Monero's C++ tree is not part of this build). Both
|
||||
# values are pinned and both are re-checked on every run: the tarball against
|
||||
# getmonero's signed hashes.txt, then the extracted binary against its own
|
||||
# sha256. Bump all four together with the workflow's pins; docs/WALLET.md is the
|
||||
# provenance record.
|
||||
monero_tarball=monero-linux-x64-v0.18.5.1.tar.bz2
|
||||
monero_tarball_sha256=22a7dda7b0cb699fdd6b7674c3b4a4465b337cc98a54983523b759e1e7cc9958
|
||||
monero_archive_dir=monero-x86_64-linux-gnu-v0.18.5.1
|
||||
wallet_rpc_sha256=c1e3aff7c72837e6f29045c439b772a82b5cd7324c8b831fa825a6ce2019a656
|
||||
|
||||
expected="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1)"
|
||||
if [ "$tag" != "v$expected" ]; then
|
||||
echo "warn: tag $tag does not match Cargo.toml version $expected (--version will report $expected)"
|
||||
|
|
@ -31,6 +42,22 @@ strip "dist/$asset"
|
|||
file "dist/$asset"
|
||||
"dist/$asset" --version
|
||||
|
||||
echo "==> fetching $monero_tarball"
|
||||
work="$(mktemp -d)"
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
curl -fsSL -o "$work/hashes.txt" https://www.getmonero.org/downloads/hashes.txt
|
||||
grep -E "^$monero_tarball_sha256[[:space:]]+$monero_tarball$" "$work/hashes.txt" > /dev/null
|
||||
echo "hashes.txt confirms $monero_tarball"
|
||||
curl -fsSL -o "$work/monero.tar.bz2" "https://downloads.getmonero.org/cli/$monero_tarball"
|
||||
echo "$monero_tarball_sha256 $work/monero.tar.bz2" | sha256sum -c -
|
||||
tar xjf "$work/monero.tar.bz2" -C "$work" "$monero_archive_dir/monero-wallet-rpc"
|
||||
mv "$work/$monero_archive_dir/monero-wallet-rpc" "$work/monero-wallet-rpc"
|
||||
echo "$wallet_rpc_sha256 $work/monero-wallet-rpc" | sha256sum -c -
|
||||
wasset="monero-wallet-rpc-$target"
|
||||
cp "$work/monero-wallet-rpc" "dist/$wasset"
|
||||
(cd dist && sha256sum "$wasset" > "$wasset.sha256" && sha256sum -c "$wasset.sha256")
|
||||
file "dist/$wasset"
|
||||
|
||||
echo "==> publishing to the release for $tag"
|
||||
scripts/publish-release.sh "$tag" "OnionWire $tag" scripts/release-body.md \
|
||||
"dist/$asset" "dist/$asset.sha256"
|
||||
"dist/$asset" "dist/$asset.sha256" "dist/$wasset" "dist/$wasset.sha256"
|
||||
Loading…
Reference in a new issue