Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 20 lines 977 B view raw
1#!/usr/bin/env nix-shell 2#!nix-shell -i bash -p curl gnused jq nix bash coreutils nix-update common-updater-scripts 3 4set -eou pipefail 5 6PACKAGE_DIR=$(realpath $(dirname $0)) 7 8latestVersion=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/beekeeper-studio/beekeeper-studio/releases/latest | jq --raw-output .tag_name | sed 's/^v//') 9 10currentVersion=$(nix-instantiate --eval -E "with import ./. {}; beekeeper-studio.version or (lib.getVersion beekeeper-studio)" | tr -d '"') 11 12if [[ "$currentVersion" == "$latestVersion" ]]; then 13 echo "package is up-to-date: $currentVersion" 14 exit 0 15fi 16 17nix-update beekeeper-studio --version "$latestVersion" || true 18 19hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url "$(nix eval -f . --raw beekeeper-studio.src.url --system aarch64-linux)")) 20update-source-version beekeeper-studio $latestVersion $hash --system=aarch64-linux --ignore-same-version