#!/usr/bin/env bash set -euo pipefail BRANCH="update-inputs" HYDRA_URL="https://hydra.kyouma.net" JOBSET_URL="${HYDRA_URL}/jobset/nixfiles/update-inputs" ROOT="$(mktemp -d)" test_build () { local build_jobs build_jobs="$(curl --fail -s -L -H "Accept: application/json" "${JOBSET_URL}/latest-eval" | jq -r ".builds | .[]")" for build in ${build_jobs}; do local build_url build_status="$(curl -s -L -H "Accept: application/json" "https://hydra.kyouma.net/build/${build}" | jq -r ".buildstatus")" [[ $build_status != 0 ]] && exit 1 done } git clone git@git.bsd.gay:snaki/nixfiles.git git checkout -b "${BRANCH}" nix flake update --commit-lock-file git push --set-upstream origin "${BRANCH}"