File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
2424 wrapProgram $out/bin/${ pname } --set JAVA_HOME "${ jre } "
2525 '' ;
2626
27- passtrhu . updateScript = ./update.sh ;
27+ passthru . updateScript = ./update.sh ;
2828
2929 meta = with lib ; {
3030 description = "Java Implementation of the Ethereum 2.0 Beacon Chain" ;
Original file line number Diff line number Diff line change 11#! /usr/bin/env nix-shell
22#! nix-shell -i bash -p curl jq nix sd
33
4- set -e
4+ set -ex
55
66dirname=" $( dirname " $0 " ) "
77rootDir=" $( git -C " $dirname " rev-parse --show-toplevel) "
@@ -15,19 +15,13 @@ updateVersion() {
1515updateHash () {
1616 local version=$1
1717 local url=" https://artifacts.consensys.net/public/${pname} /raw/names/${pname} .tar.gz/versions/${version} /${pname} -${version} .tar.gz"
18-
19- local output=$( nix store prefetch-file --json " $url " )
20- local sriHash=$( echo " $output " | jq -r .hash)
21-
22- sd " \" hash\" = \" [a-zA-Z0-9\/+-=]*\" ;" " \" hash\" = \" $sriHash \" ;" " ${dirname} /default.nix"
18+ local sriHash=$( nix store prefetch-file --json " $url " | jq -r ' .hash' )
19+ sd ' hash = "[a-zA-Z0-9/+-=]*";' " hash = \" $sriHash \" ;" " ${dirname} /default.nix"
2320}
2421
25- currentVersion=$( nix show- derivation " ${rootDir} #${pname} " | jq -r ' .[].env.version' )
22+ currentVersion=$( nix derivation show " ${rootDir} #${pname} " | jq -r ' .[].env.version' )
2623latestVersion=$( curl -s " https://api.github.com/repos/ConsenSys/teku/releases/latest" | jq -r ' .tag_name' )
2724
28- # Optionally strip leading 'v' if present in the tag name
29- latestVersion=${latestVersion# v}
30-
3125if [[ " $currentVersion " == " $latestVersion " ]]; then
3226 echo " ${pname} is up to date: ${currentVersion} "
3327 exit 0
You can’t perform that action at this time.
0 commit comments