Update from update-inputs-2024-02-18-19-03
This commit is contained in:
commit
a6554dc498
@ -2,17 +2,37 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
NOW="$(date --utc --iso-8601=minutes)"
|
xgit() {
|
||||||
|
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
NOW="$(date --utc +%Y-%m-%d-%H-%M)"
|
||||||
|
|
||||||
|
xgit status || xgit clone gitea@git.clerie.de:clerie/nixfiles.git .
|
||||||
|
|
||||||
git status || git clone gitea@git.clerie.de:clerie/nixfiles.git .
|
|
||||||
echo "[!] Download changes"
|
echo "[!] Download changes"
|
||||||
git fetch --all
|
xgit 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 "[!] Chechout remote master"
|
||||||
echo "[!] Update inputs"
|
xgit checkout origin/master
|
||||||
nix flake update
|
|
||||||
|
UPDATE_BRANCH="update-inputs-${NOW}"
|
||||||
|
echo "[!] Create branch ${UPDATE_BRANCH}"
|
||||||
|
xgit checkout -b "${UPDATE_BRANCH}"
|
||||||
|
|
||||||
|
echo "[!] Update nixpkgs"
|
||||||
|
nix flake lock --update-input nixpkgs
|
||||||
|
|
||||||
echo "[!] Commit changes"
|
echo "[!] Commit changes"
|
||||||
git add flake.lock
|
xgit add flake.lock
|
||||||
git -c "user.name=Flake Update Bot" -c "user.email=flake-update-bot@clerie.de" commit -m "Flake update ${NOW}" || true
|
xgit commit -m "Update nixpkgs ${NOW}" || true
|
||||||
echo "[!] Publish"
|
|
||||||
git push origin updated-inputs
|
echo "[!] Publish ${UPDATE_BRANCH}"
|
||||||
|
xgit push --set-upstream origin "${UPDATE_BRANCH}"
|
||||||
|
|
||||||
|
echo "[!] Merge ${UPDATE_BRANCH} into updated-inputs"
|
||||||
|
xgit checkout updated-inputs
|
||||||
|
xgit merge -s ort -X theirs "${UPDATE_BRANCH}" -m "Update from ${UPDATE_BRANCH}"
|
||||||
|
|
||||||
|
echo "[!] Publish updated-inputs"
|
||||||
|
xgit push origin updated-inputs
|
||||||
|
Loading…
Reference in New Issue
Block a user