nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 15 lines 645 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 "s|(electron_)[0-9]+|\1$electronVersion|" -i pkgs/by-name/we/webcord{,-vencord}/package.nix