nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 20 lines 995 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 6latestVersion=$(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//') 7currentVersion=$(nix eval --raw -f . beekeeper-studio.version) 8 9if [[ "$currentVersion" == "$latestVersion" ]]; then 10 echo "package is up-to-date: $currentVersion" 11 exit 0 12fi 13 14nix-update beekeeper-studio --version "$latestVersion" || true 15 16systems=$(nix eval --json -f . beekeeper-studio.meta.platforms | jq --raw-output '.[]') 17for system in $systems; do 18 hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix eval --raw -f . beekeeper-studio.src.url --system "$system"))) 19 update-source-version beekeeper-studio $latestVersion $hash --system=$system --ignore-same-version --ignore-same-hash 20done