From c4f722357a56b783eb80321737a9fe541653641f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 30 Apr 2022 19:51:05 +0200 Subject: [PATCH] Start working on pre-commit hook enforcement of atomic commits --- shell/hooks/pre-commit.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/shell/hooks/pre-commit.sh b/shell/hooks/pre-commit.sh index 985d3b40..69e19fb0 100755 --- a/shell/hooks/pre-commit.sh +++ b/shell/hooks/pre-commit.sh @@ -27,3 +27,39 @@ if [[ $? != '0' ]]; then "Review the output and commit your fixes" >&2 exit 1 fi + +PUBLIC_FILES=[ + 'modules/*' + 'doc/*' + 'hosts/bootstrap.nix' + 'hosts/PubSolarOS.nix' + 'iso/*' + 'lib/*' + 'overlays/*' + 'pkgs/*' + 'profiles/base-user/*' + 'profiles/cachix/*' + 'profiles/core/*' + 'profiles/gaming/*' + 'shell/*' + 'users/modules/*' + 'users/nixos/*' + 'users/profiles/*' + 'users/root/*' + '.drone/*' + '.github/*' + '.drone.yml' + '.editorconfig' + '.envrc' + '.gitignore' + 'CHANGELOG.md' + 'COPYING' + 'default.nix' + 'flake.nix' + 'CHANGELOG.md' + 'CHANGELOG.md' + 'README.md' + 'shell.nix' +] +public_files=($($diff -- 'modules/*')) +private_files=($($diff -- '*.nix'))