forked from googleapis/google-api-dotnet-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SupportLibraries.proj
45 lines (38 loc) · 1.55 KB
/
SupportLibraries.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
<Project ToolsVersion="12.0" DefaultTargets="Build;Package" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<ItemGroup>
<_SolutionFile Include="Src\Support\GoogleApisClient.sln">
<AdditionalProperties>
Configuration=ReleaseSigned
</AdditionalProperties>
</_SolutionFile>
</ItemGroup>
<Exec Command="nuget restore "%(_SolutionFile.FullPath)"" />
<MSBuild Projects="@(_SolutionFile)" BuildInParallel="True" Targets="Build"/>
</Target>
<!--
Set GoogleApisVersion to major.minor.revision from Google.Apis.Core.dll.
-->
<Target Name="GetGoogleApisVersion">
<GetAssemblyIdentity
AssemblyFiles="Src\Support\GoogleApis\Portable\bin\ReleaseSigned\Google.Apis.Core.dll">
<Output TaskParameter="Assemblies" ItemName="GoogleApisAssembly" />
</GetAssemblyIdentity>
<PropertyGroup>
<!--
Parse and reformat the version, keeping the first three components.
-->
<GoogleApisVersion>$(
[System.Version]::Parse(%(GoogleApisAssembly.Version)).ToString(3)
)</GoogleApisVersion>
</PropertyGroup>
</Target>
<Target Name="Package" DependsOnTargets="GetGoogleApisVersion">
<MakeDir Directories="NuPkgs\Support" />
<ItemGroup>
<NuSpec Include="Src\Support\**\*.nuspec" />
</ItemGroup>
<!-- Run 'nuget pack' for each .nuspec found. -->
<Exec Command="nuget pack "%(NuSpec.FullPath)" -BasePath . -OutputDirectory NuPkgs\Support -Version $(GoogleApisVersion)" />
</Target>
</Project>