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"; owner = "matrix-org";
repo = "matrix-appservice-discord"; repo = "matrix-appservice-discord";
rev = "v${version}"; rev = "v${version}";
sha256 = pin.srcSha256; hash = pin.srcHash;
}; };
packageJSON = ./package.json; packageJSON = ./package.json;

View File

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

View File

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