nix-config/packages/dev-commit.nix
Oliver Davies d18476da73
All checks were successful
/ check (push) Successful in 1m27s
Refactor
2025-07-09 06:54:21 +01:00

26 lines
402 B
Nix

{ pkgs, ... }:
pkgs.writeShellApplication {
name = "dev-commit";
runtimeInputs = with pkgs; [
coreutils
git
openssh
];
text = ''
IFS=':' read -ra repos <<< "$DEV_COMMIT_PATHS"
for repo in "''${repos[@]}"; do
echo "Processing $repo"
pushd "$repo"
git add .
git commit -m "Automated dev commit" || true
git push
popd
done
'';
}