2020-11-19 02:01:45 +00:00
|
|
|
#! /usr/bin/env nix-shell
|
|
|
|
#! nix-shell -i bash -p git
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
archive_hash () {
|
|
|
|
repo=$1
|
|
|
|
rev=$2
|
|
|
|
nix-prefetch-url --unpack "https://github.com/${repo}/archive/${rev}.tar.gz" 2> /dev/null | tail -n 1
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "Fetching latest lightningd/plugins release"
|
|
|
|
latest=$(git ls-remote https://github.com/lightningd/plugins master | cut -f 1)
|
2022-05-22 13:56:14 +00:00
|
|
|
echo "rev = \"${latest}\";"
|
2022-08-16 19:00:00 +00:00
|
|
|
echo "sha256 = \"$(archive_hash lightningd/plugins "$latest")\";"
|