nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 26 lines 791 B view raw
1#!/usr/bin/env nix-shell 2#!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq common-updater-scripts 3set -euo pipefail 4cd "$(dirname "${BASH_SOURCE[0]}")" 5 6new_version="$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} -s "https://api.github.com/repos/JustArchiNET/ArchiSteamFarm/releases" | jq -r 'map(select(.prerelease == false)) | .[0].tag_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 if [[ "${1-default}" != "--deps-only" ]]; then 12 exit 0 13 fi 14fi 15 16asf_path=$PWD 17cd ../../../.. 18 19if [[ "${1:-}" != "--deps-only" ]]; then 20 update-source-version ArchiSteamFarm "$new_version" 21fi 22 23$(nix-build -A ArchiSteamFarm.fetch-deps --no-out-link) 24 25cd "$asf_path/web-ui" 26./update.sh