nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 26 lines 863 B view raw
1#!/usr/bin/env nix-shell 2#!nix-shell -i bash -p curl jq gnused common-updater-scripts 3 4set -euo pipefail 5 6nixpkgs=$(git rev-parse --show-toplevel) 7packageDir="$nixpkgs/pkgs/by-name/pa/parallel-launcher" 8 9getLatestVersion() { 10 curl -s "https://gitlab.com/api/v4/projects/parallel-launcher%2F$1/repository/tags" \ 11 | jq -r '.[0].name' \ 12 | sed 's|v||' \ 13 | sed 's|-|.|' 14} 15 16updateSourceVersion() { 17 update-source-version "$1" "$2" --file="$3" --print-changes 18} 19 20latestLauncherVersion=$(getLatestVersion parallel-launcher) 21latestCoreVersion=$(getLatestVersion parallel-n64) 22 23launcherUpdate=$(updateSourceVersion parallel-launcher "$latestLauncherVersion" "$packageDir/package.nix") 24coreUpdate=$(updateSourceVersion parallel-launcher.parallel-n64-core "$latestCoreVersion" "$packageDir/parallel-n64-next.nix") 25 26echo '[]' | jq ". += $launcherUpdate + $coreUpdate"