f7ea336cb2
The nixpkgs-check-by-name tooling is [being moved](https://github.com/NixOS/nixpkgs/issues/286559#issuecomment-2000466124) to a [separate repo](https://github.com/NixOS/nixpkgs-check-by-name). This commit updates Nixpkgs CI to use it instead of the tree inside Nixpkgs No changes have been made to the tooling locally since it was moved: - [Exported history](55bf02190e/pkgs/test/nixpkgs-check-by-name
) - [Imported history](d579e1821d
/)
22 lines
657 B
Bash
Executable file
22 lines
657 B
Bash
Executable file
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p jq curl
|
|
|
|
set -o pipefail -o errexit -o nounset
|
|
|
|
trace() { echo >&2 "$@"; }
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
repository=NixOS/nixpkgs-check-by-name
|
|
pin_file=$SCRIPT_DIR/pinned-version.txt
|
|
|
|
trace -n "Fetching latest release of $repository.. "
|
|
latestRelease=$(curl -sSfL \
|
|
-H "Accept: application/vnd.github+json" \
|
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
https://api.github.com/repos/"$repository"/releases/latest)
|
|
latestVersion=$(jq .tag_name -r <<< "$latestRelease")
|
|
trace "$latestVersion"
|
|
|
|
trace "Updating $pin_file"
|
|
echo "$latestVersion" > "$pin_file"
|