Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 15 lines 643 B view raw
1#! /usr/bin/env nix-shell 2#! nix-shell -i bash -p curl jq nix-update 3 4set -ex 5 6curl_github() { 7 curl -L ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@" 8} 9 10latestTag=$(curl_github https://api.github.com/repos/SpacingBat3/Webcord/releases/latest | jq -r ".tag_name") 11latestVersion="$(expr "$latestTag" : 'v\(.*\)')" 12 13nix-update --version "$latestVersion" webcord 14electronVersion=$(curl_github "https://raw.githubusercontent.com/SpacingBat3/WebCord/v$latestVersion/package.json" | jq -r ".devDependencies.electron" | sed -r 's|^\^([0-9]+).*|\1|') 15sed -r "/webcord = / s|(electron_)[0-9]+|\1$electronVersion|" -i pkgs/top-level/all-packages.nix