#git-hook #hook #git #pre-commit #husky #pre-push

build set-git-hooks-dir

Deadly simple Git hooks directory setup tool

2 releases (1 stable)

1.0.2 Jul 5, 2024
1.0.0 Jul 4, 2024
0.0.0 Jun 21, 2024

#268 in Build Utils

Download history 83/week @ 2024-06-15 36/week @ 2024-06-22 188/week @ 2024-06-29 121/week @ 2024-07-06 5/week @ 2024-07-13

98 downloads per month

MIT license

6KB
79 lines

set-git-hooks-dir crate

Usage

See https://github.com/rhysd/set-git-hooks-dir#readme for the usage.

Advanced usage

If you want to configure the Git hooks in your own build script, it is still possible to disable the automatic setup by disabling the crate feature.

Install this package as a build dependency instead of dev dependency.

cargo add set-git-hooks-dir --build --no-default-features

Then use set_git_hooks_dir::setup function in your build.rs.

fn main() {
    #[cfg(debug_assertions)]
    let _ = set_git_hooks_dir::setup(".git-hooks");
}

License

This crate is distributed under the MIT license.


lib.rs:

set-git-hooks-dir is a deadly simple crate to manage your Git hooks automatically. See the following document for the usage:

https://github.com/rhysd/set-git-hooks-dir

No runtime deps