fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / by-name / di / discordchatexporter-cli / updater.sh
blobd61235ef5c6fd41cf7fadbf3e3b82d2ed8cd74cf
1 #!/usr/bin/env nix-shell
2 #!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
3 set -eo pipefail
4 cd "$(dirname "${BASH_SOURCE[0]}")"
6 new_version="$(curl -s "https://api.github.com/repos/tyrrrz/DiscordChatExporter/releases?per_page=1" | jq -r '.[0].name')"
7 old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./package.nix)"
8 if [[ "$new_version" == "$old_version" ]]; then
9 echo "Up to date"
10 exit 0
13 cd ../../../..
14 update-source-version discordchatexporter-cli "$new_version"
15 $(nix-build -A discordchatexporter-cli.fetch-deps --no-out-link)