ieda: init at 0-unstable-2024-10-11 (#338769)
[NixPkgs.git] / pkgs / servers / nosql / eventstore / updater.sh
blob77c2f733e5f82c6414525c626cb2c7a831fcf12c
1 #! /usr/bin/env nix-shell
2 #! nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
3 # shellcheck shell=bash
5 set -euo pipefail
7 cd "$(dirname "${BASH_SOURCE[0]}")"
9 new_version="$(curl -s "https://api.github.com/repos/EventStore/EventStore/releases/latest" | jq -r '.name')"
10 new_version="${new_version#oss-v}"
11 old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
13 if [[ "$new_version" == "$old_version" ]]; then
14 echo "Already up to date!"
15 exit 0
18 cd ../../../..
19 update-source-version eventstore "${new_version//v}"
21 $(nix-build -A eventstore.fetch-deps --no-out-link)