I am coming from NodeJS world where I can easily add pre-commit
and pre-push
hooks with the husky or many other libraries.
Is there any way/library that can do the same for dotnetcore
?
If not can Nukebuild copy files to ../.git/hooks
folder (based on the OS)?
I am looking for something like
public Targets Hook => _ => _
.Description("Setup Hooks")
.Executes(() => {
// checks the os
// copy file to ../.git/hooks based on the os
});
You can check on which operating system you're on using
EnvironmentInfo.IsWin
,IsUnix
,IsOsx
.