From 2bb6eeb7c025dfb15d64e6475311ecaba09d2176 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Wed, 1 Feb 2023 13:14:23 +1000 Subject: [PATCH] Makefile/Rakefile add target/task for `pre-commit install` --- Makefile | 4 ++++ Rakefile | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 4e70a8e63..b114c09b5 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,10 @@ check : pre-commit run --all-files .PHONY : check +checkinstall : + pre-commit install +.PHONY : checkinstall + checkupdate : pre-commit autoupdate .PHONY : checkupdate diff --git a/Rakefile b/Rakefile index 5a8fbdb50..2a8e11d43 100644 --- a/Rakefile +++ b/Rakefile @@ -100,6 +100,11 @@ task :check do sh "pre-commit run --all-files" end +desc "install the pre-commit hooks" +task :checkinstall do + sh "pre-commit install" +end + desc "check the pre-commit hooks for updates" task :checkupdate do sh "pre-commit autoupdate"