From bd58ca66086eda8f137aa37bfef8002864d81ae6 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 25 May 2022 19:39:31 +0200 Subject: [PATCH] pre-commit: alter when 'nix build' runs * do not run 'nix build' on arbitrary go src file changes, instead (except for nix and flake related changes) only run on module-wide changes, i.e. when sum,mod files change as these require flake vendorSha256 updates or else they would fail to build. --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bc32f49..a2c34b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,6 +66,6 @@ repos: entry: nix build .#go-xkcdreader pass_filenames: false # trigger this hook on changes to any of nix (also flake.lock) files - # and go's src, mod or sum files - files: '\.*.(nix|lock|go|mod|sum)$' + # and go's mod or sum files + files: '\.*.(nix|lock|mod|sum)$' language: system