matrix-appservice-discord: adapt update script to new nix-prefetch-github

This commit is contained in:
Theodore Ni 2023-07-07 23:02:51 -07:00
parent e8808ced29
commit f38f3e439b
No known key found for this signature in database
GPG key ID: 48B67583BDDD4474
3 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@ in mkYarnPackage rec {
owner = "matrix-org";
repo = "matrix-appservice-discord";
rev = "v${version}";
sha256 = pin.srcSha256;
hash = pin.srcHash;
};
packageJSON = ./package.json;

View file

@ -1,5 +1,5 @@
{
"version": "3.1.1",
"srcSha256": "g681w7RD96/xKP+WnIyY4bcVHVQhysgDPZo4TgCRiuY=",
"srcHash": "sha256-g681w7RD96/xKP+WnIyY4bcVHVQhysgDPZo4TgCRiuY=",
"yarnSha256": "0cm9yprj0ajmrdpap3p2lx3xrrkar6gghlxnj9127ks6p5c1ji3r"
}

View file

@ -22,7 +22,7 @@ if [ -z "$tag" ]; then
fi
src="https://raw.githubusercontent.com/$ORG/$PROJ/$tag"
src_sha256=$(nix-prefetch-github $ORG $PROJ --rev ${tag} | jq -r .sha256)
src_hash=$(nix-prefetch-github $ORG $PROJ --rev ${tag} | jq -r .hash)
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
@ -36,7 +36,7 @@ curl -O "$src/package.json"
cat > pin.json << EOF
{
"version": "$(echo $tag | grep -P '(\d|\.)+' -o)",
"srcSha256": "$src_sha256",
"srcSha256": "$src_hash",
"yarnSha256": "$yarn_sha256"
}
EOF