Reputation: 4760
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
});
Upvotes: 0
Views: 458
Reputation: 16209
You can check on which operating system you're on using EnvironmentInfo.IsWin
, IsUnix
, IsOsx
.
Upvotes: 0