1 #! /usr/bin/env nix-shell
2 #! nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
3 # shellcheck shell=bash
7 cd "$(dirname "${BASH_SOURCE[0]}")"
9 deps_file
="$(realpath ".
/deps.nix
")"
11 new_version
="$(curl -s "https
://api.github.com
/repos
/OmniSharp
/omnisharp-roslyn
/releases?per_page
=1" | jq -r '.[0].name')"
12 old_version
="$(sed -nE 's/\s*version = "(.
*)".*/\1/p' ./default.nix)"
14 if [[ "$new_version" == "$old_version" ]]; then
15 echo "Already up to date!"
20 update-source-version omnisharp-roslyn
"${new_version//v}"
22 $
(nix-build
-A omnisharp-roslyn.fetch-deps
--no-out-link) "$deps_file"