nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1#!/usr/bin/env nix-shell
2#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
3set -eo pipefail
4cd "$(dirname "${BASH_SOURCE[0]}")"
5
6new_version="$(curl -s "https://api.github.com/repos/jackett/jackett/releases?per_page=1" | jq -r '.[0].name')"
7old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
8
9if [[ "$new_version" == "$old_version" ]]; then
10 echo "Already up to date!"
11 exit 0
12fi
13
14cd ../../..
15update-source-version jackett "${new_version//v}"
16$(nix-build -A jackett.fetch-deps --no-out-link)