1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-yarn-deps yarn nix-prefetch nix-prefetch-github
4 if [ "$#" -gt 1 ] ||
[[ "$1" == -* ]]; then
5 echo "Regenerates packaging data for the seshat package."
6 echo "Usage: $0 [git release tag]"
14 if [ -z "$version" ]; then
15 version
="$(wget -O- "https
://api.github.com
/repos
/matrix-org
/seshat
/tags
" | jq -r '.[] | .name' | sort --version-sort | tail -1)"
18 SRC
="https://raw.githubusercontent.com/matrix-org/seshat/$version"
21 trap 'rm -rf "$tmpdir"' EXIT
24 wget
"$SRC/seshat-node/yarn.lock"
25 yarn_hash
=$
(prefetch-yarn-deps yarn.lock
)
28 src_hash
=$
(nix-prefetch-github matrix-org seshat
--rev ${version} | jq
-r .
hash)
32 "version": "$version",
33 "srcHash": "$src_hash",
34 "yarnHash": "$yarn_hash",
35 "cargoHash": "0000000000000000000000000000000000000000000000000000"
39 cargo_hash
=$
(nix-prefetch
"{ sha256 }: (import ../../../../../.. {}).element-desktop.seshat.cargoDeps")
43 "version": "$version",
44 "srcHash": "$src_hash",
45 "yarnHash": "$yarn_hash",
46 "cargoHash": "$cargo_hash"