Open shivam-880 opened 2 years ago
In theory it should be possible by overriding the hooksSourceDir
setting key, but I am afraid it doesn't have any effect.
I tried myself overriding the gitHooksDir
setting key in order to adopt the plugin to git with sub-modules, but sbt warns me that this key is not used.
Very strange.
You can override default plugin settings in build.sbt
file with i.e.:
Seq(GitHooks.globalSettings *)
gitHooksDir := Some(file("../.git/hooks"))
If you want to write hooks on each compile use:
(Compile / compile) := ((Compile / compile) dependsOn writeHooks).value
Allow to rename the default hook directory name from
git-hooks
to.githooks
or make.githooks
as default for the sake for convention.