pkgs/nixfiles: add script that updates flake inputs and pushes it to upstream
This commit is contained in:
10
pkgs/nixfiles/default.nix
Normal file
10
pkgs/nixfiles/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "nixfiles-updated-inputs.sh";
|
||||
text = builtins.readFile ./nixfiles-updated-inputs.sh;
|
||||
runtimeInputs = [
|
||||
pkgs.git
|
||||
];
|
||||
}
|
||||
|
||||
13
pkgs/nixfiles/nixfiles-updated-inputs.sh
Executable file
13
pkgs/nixfiles/nixfiles-updated-inputs.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
NOW="$(date --utc --iso-8601=minutes)"
|
||||
|
||||
git fetch origin master
|
||||
git checkout updated-inputs
|
||||
git merge -s ort -X theirs origin/master -m "Update from master ${NOW}"
|
||||
nix flake update
|
||||
git add flake.lock
|
||||
git commit -m "Flake update ${NOW}" || true
|
||||
git push origin updated-inputs
|
||||
Reference in New Issue
Block a user