Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 24 lines 994 B view raw
1#!/usr/bin/env nix-shell 2#!nix-shell -i bash -p bash nix curl coreutils common-updater-scripts nix-update 3 4set -eou pipefail 5 6currentVersion=$(nix-instantiate --eval -E "with import ./. {}; phoenixd.version or (lib.getVersion phoenixd)" | tr -d '"') 7nix-update phoenixd --system x86_64-linux 8latestVersion=$(nix-instantiate --eval -E "with import ./. {}; phoenixd.version or (lib.getVersion phoenixd)" | tr -d '"') 9 10echo "latest version: $latestVersion" 11echo "current version: $currentVersion" 12 13if [[ "$latestVersion" == "$currentVersion" ]]; then 14 echo "package is up-to-date" 15 exit 0 16fi 17 18for system in \ 19 aarch64-linux \ 20 x86_64-darwin \ 21 aarch64-darwin; do 22 hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; phoenixd.src.url" --system "$system" | tr -d '"'))) 23 update-source-version phoenixd $latestVersion $hash --system=$system --ignore-same-version 24done