mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 22:48:02 +03:00
feat: pre-commit-hook to cleanup leftover example artifacts
This commit is contained in:
parent
97243aa70a
commit
130d71f9d5
11
flake.nix
11
flake.nix
@ -318,6 +318,17 @@
|
||||
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
|
||||
'');
|
||||
};
|
||||
cleanup = {
|
||||
enable = true;
|
||||
name = "cleaned";
|
||||
entry = l.toString (pkgs.writeScript "cleaned" ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
for badFile in $(find ./examples | grep 'flake.lock\|dream2nix-packages'); do
|
||||
rm -rf $badFile
|
||||
git add $badFile || :
|
||||
done
|
||||
'');
|
||||
};
|
||||
is-cleaned = {
|
||||
enable = true;
|
||||
name = "is-cleaned";
|
||||
|
Loading…
Reference in New Issue
Block a user