1
0
nixfiles/pkgs/nixfiles/nixfiles-updated-inputs.sh

19 lines
621 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
NOW="$(date --utc --iso-8601=minutes)"
git status || git clone gitea@git.clerie.de:clerie/nixfiles.git .
echo "[!] Download changes"
git fetch --all
git checkout updated-inputs
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" merge -s ort -X theirs origin/master -m "Update from master ${NOW}"
echo "[!] Update inputs"
nix flake update
echo "[!] Commit changes"
git add flake.lock
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" commit -m "Flake update ${NOW}" || true
echo "[!] Publish"
git push origin updated-inputs