1 #! /usr/bin/env nix-shell
2 #! nix-shell -i bash -p curl jq nix-update
7 curl
-L ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
10 latestTag
=$
(curl_github https
://api.github.com
/repos
/SpacingBat
3/Webcord
/releases
/latest | jq
-r ".tag_name")
11 latestVersion
="$(expr "$latestTag" : 'v\(.*\)')"
13 nix-update
--version "$latestVersion" webcord
14 electronVersion
=$
(curl_github
"https://raw.githubusercontent.com/SpacingBat3/WebCord/v$latestVersion/package.json" | jq
-r ".devDependencies.electron" |
sed -r 's|^\^([0-9]+).*|\1|')
15 sed -r "/webcord = / s|(electron_)[0-9]+|\1$electronVersion|" -i pkgs
/top-level
/all-packages.nix