-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #156: Get electrs source tarball with gpg verified sha256 and c…
…orresponding helper script 1acb22a Get electrs source tarball with gpg verified sha256 and corresponding helper script (nixbitcoin) 707b06a Update pinned nixpkgs (nixbitcoin) Pull request description: ACKs for top commit: jonasnick: ACK 1acb22a Tree-SHA512: 9664d7e8dbedbc7e6c4ccbf8059a4e6379ebeca46ae60da8ac22d424d53830435642a89bfb2a4ff988589e21c8e08d494d933923667f0634830eec4717f0c52a
- Loading branch information
Showing
3 changed files
with
34 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env nix-shell | ||
#! nix-shell -i bash -p git gnupg | ||
set -euo pipefail | ||
|
||
TMPDIR="$(mktemp -d -p /tmp)" | ||
trap "rm -rf $TMPDIR" EXIT | ||
cd $TMPDIR | ||
|
||
echo "Fetching latest release" | ||
git clone https://github.com/romanz/electrs 2> /dev/null | ||
cd electrs | ||
latest=$(git describe --tags `git rev-list --tags --max-count=1`) | ||
echo "Latest release is ${latest}" | ||
|
||
# GPG verification | ||
export GNUPGHOME=$TMPDIR | ||
echo "Fetching Roman Zeyde's Key" | ||
gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv-keys 15c8c3574ae4f1e25f3f35c587cae5fa46917cbb 2> /dev/null | ||
echo "Verifying latest release" | ||
git verify-tag ${latest} | ||
|
||
echo "tag: ${latest}" | ||
# The prefix option is necessary because GitHub prefixes the archive contents in this format | ||
echo "sha256: $(git archive --format tar.gz --prefix=electrs-"${latest//v}"/ ${latest} | sha256sum | cut -d\ -f1)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters