-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathxunit.proj
71 lines (57 loc) · 3.86 KB
/
xunit.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)/bin/$(Configuration)</PackagesOutput>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<ItemGroup>
<RepositoryReference Include="abstractions-xunit" />
</ItemGroup>
<Target Name="RepoBuild">
<PropertyGroup>
<BuildAndRestoreProject>$(ProjectDirectory)/xunit-notests.slnf</BuildAndRestoreProject>
<BuildCommandArgs>/p:Configuration=$(Configuration)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:PackageVersion=$(XunitReleaseVersion)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DelaySign=$(DelaySign)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:PublicSign=$(PublicSign)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /v:$(LogVerbosity)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:PackageOutputPath=$(PackagesOutput)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) $(RedirectRepoOutputToLog)</BuildCommandArgs>
</PropertyGroup>
<!-- We use an explicit nuspec when packing to minimize the number of changes required
in patches. This means we need to pass the nuspec properties explicitly.
The nuspec properties are of the form X=Y;Z=W, which doesn't play well with command lines,
so pass in environment variables. Be sure to escape the ';' so that msbuild doesn't interpret it as
two separate items in the item group -->
<ItemGroup>
<PackEnvironmentVariables Include="@(EnvironmentVariables)" />
<PackEnvironmentVariables Include="NuspecProperties=PackageVersion=$(XunitReleaseVersion)%3BConfiguration=$(Configuration)"/>
<PackProjectAndNuspec Include="$(ProjectDirectory)/src/xunit.execution/xunit.execution.csproj">
<NuspecFile>$(ProjectDirectory)/src/xunit.extensibility.execution.nuspec</NuspecFile>
</PackProjectAndNuspec>
<PackProjectAndNuspec Include="$(ProjectDirectory)/src/xunit.execution/xunit.execution.csproj">
<NuspecFile>$(ProjectDirectory)/src/xunit.extensibility.core.nuspec</NuspecFile>
</PackProjectAndNuspec>
<PackProjectAndNuspec Include="$(ProjectDirectory)/src/xunit.runner.utility/xunit.runner.utility.csproj">
<NuspecFile>$(ProjectDirectory)/src/xunit.runner.utility.nuspec</NuspecFile>
</PackProjectAndNuspec>
<PackProjectAndNuspec Include="$(ProjectDirectory)/src/xunit.core/xunit.core.csproj">
<NuspecFile>$(ProjectDirectory)/src/xunit.core.nuspec</NuspecFile>
</PackProjectAndNuspec>
</ItemGroup>
<Exec Command="$(DotnetToolCommand) restore /bl:restore.binlog $(BuildAndRestoreProject) $(BuildCommandArgs) "
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
<Exec Command="$(DotnetToolCommand) build /bl:build.binlog $(BuildAndRestoreProject) $(BuildCommandArgs)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
<!-- xunit has a non-standard set of packaging. Instead of calling pack on the solution call it on each individual build project,
with no-build and and no-restore, with the explicit nuspecs associated with the various projects. -->
<Exec Command="$(DotnetToolCommand) pack --no-build --no-restore /bl:pack.binlog @(PackProjectAndNuspec) /p:NuspecFile=%(PackProjectAndNuspec.NuspecFile) $(BuildCommandArgs)"
EnvironmentVariables="@(PackEnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
</Target>
</Project>