-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNuGetFromSpec.targets
More file actions
28 lines (24 loc) · 1.37 KB
/
Copy pathNuGetFromSpec.targets
File metadata and controls
28 lines (24 loc) · 1.37 KB
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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Property that enables building a package from a spec -->
<BuildPackageFromSpec Condition=" '$(BuildPackageFromSpec)' == '' ">false</BuildPackageFromSpec>
</PropertyGroup>
<PropertyGroup>
<!-- Commands -->
<BuildFromSpecCommand>$(NuGetCommand) pack "$(MSBuildProjectDirectory)\NuGet.Core.Contracts.nuspec" -Version "$(Appveyor_ProjectVersion)" -Properties "Configuration=$(Configuration);Platform=$(Platform);OutputDirectory=$(PackageOutputDir);" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -NoPackageAnalysis</BuildFromSpecCommand>
<!-- The -NoPackageAnalysis is for a warning thrown when a dll is put in the tools directory (or in the not-lib directory). -->
<!-- Make the build depend on building a package from a spec -->
<BuildDependsOn Condition="$(BuildPackageFromSpec) == 'true'">
$(BuildDependsOn);
BuildPackageFromSpec;
</BuildDependsOn>
</PropertyGroup>
<Target Name="BuildPackageFromSpec" AfterTargets="Build" Condition="$(BuildPackageFromSpec) == 'true'">
<Exec Command="$(BuildFromSpecCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />
<Exec Command="$(BuildFromSpecCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
</Project>