-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
24 lines (23 loc) · 880 Bytes
/
Copy pathDirectory.Build.targets
File metadata and controls
24 lines (23 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<Project>
<PropertyGroup>
<HuskyRoot Condition="'$(HuskyRoot)' == ''">$(MSBuildThisFileDirectory)</HuskyRoot>
</PropertyGroup>
<Target Name="Husky"
AfterTargets="Restore"
Condition="'$(HUSKY)' != 0 and !Exists('$(HuskyRoot).husky/_/install.stamp')">
<Exec Command="dotnet tool restore"
StandardOutputImportance="Low"
StandardErrorImportance="High"
WorkingDirectory="$(HuskyRoot)" />
<Exec Command="dotnet husky install"
StandardOutputImportance="Low"
StandardErrorImportance="High"
WorkingDirectory="$(HuskyRoot)" />
<Touch Files="$(HuskyRoot).husky/_/install.stamp"
AlwaysCreate="true"
Condition="Exists('$(HuskyRoot).husky/_')" />
<ItemGroup>
<FileWrites Include="$(HuskyRoot).husky/_/install.stamp" />
</ItemGroup>
</Target>
</Project>