|
2 | 2 | <Project ToolsVersion="14.0" DefaultTargets="All" InitialTargets="CheckSigningToolsPath" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3 | 3 | <PropertyGroup>
|
4 | 4 | <Root>$(MSBuildThisFileDirectory)..\</Root>
|
5 |
| - <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> |
| 5 | + <Configuration Condition="'$(Configuration)' == ''">Release</Configuration> |
6 | 6 | <Artifacts>$(Root)artifacts\</Artifacts>
|
7 | 7 | <Description>Microsoft Azure PowerShell Common</Description>
|
8 | 8 | <Keywords>Microsoft Azure PowerShell Common</Keywords>
|
9 | 9 | <Certificates>72, 400</Certificates>
|
| 10 | + <OutputDir>$(Artifacts)$(Configuration)\</OutputDir> |
10 | 11 | </PropertyGroup>
|
11 | 12 |
|
12 |
| - <UsingTask TaskName="CodeSigningTask" AssemblyFile="$(SigningToolsPath)\Microsoft.WindowsAzure.Tools.Build.Tasks.OnPremise.dll" /> |
13 |
| - <Import Project="$(SigningToolsPath)\Microsoft.WindowsAzure.Build.OnPremise.msbuild" /> |
14 |
| - |
15 | 13 | <Target Name="CheckSigningToolsPath">
|
16 | 14 | <Error Text="SigningToolsPath is not assigned a file path!" Condition="'$(SigningToolsPath)' == ''" />
|
17 | 15 | <Error Text="The SigningToolsPath directory does not exist!" Condition="!Exists($(SigningToolsPath))" />
|
18 | 16 | </Target>
|
19 | 17 |
|
| 18 | + <UsingTask TaskName="CodeSigningTask" AssemblyFile="$(SigningToolsPath)\Microsoft.WindowsAzure.Tools.Build.Tasks.OnPremise.dll" /> |
| 19 | + <Import Project="$(SigningToolsPath)\Microsoft.WindowsAzure.Build.OnPremise.msbuild" /> |
| 20 | + |
20 | 21 | <Target Name="net452">
|
21 | 22 | <Message Importance="high" Text="Sign: net452 started" />
|
22 |
| - <PropertyGroup> |
23 |
| - <OutputDir>$(Artifacts)$(Configuration)\net452\</OutputDir> |
24 |
| - </PropertyGroup> |
25 | 23 | <ItemGroup>
|
26 |
| - <Net452Files Include="$(OutputDir)Microsoft.Azure.Commands*.dll" /> |
27 |
| - <Net452Files Include="$(OutputDir)Microsoft.WindowsAzure.Commands*.dll" /> |
| 24 | + <UnsignedFiles Include="$(OutputDir)net452\Microsoft.Azure.Commands*.dll" /> |
| 25 | + <UnsignedFiles Include="$(OutputDir)net452\Microsoft.WindowsAzure.Commands*.dll" /> |
28 | 26 | </ItemGroup>
|
29 |
| - <CodeSigningTask |
30 |
| - Description="$(Description)" |
31 |
| - Keywords="$(Keywords)" |
32 |
| - UnsignedFiles="@(Net452Files)" |
33 |
| - DestinationPath="$(OutputDir)" |
34 |
| - BasePath="$(OutputDir)" |
35 |
| - Certificates="$(Certificates)" |
36 |
| - SigningLogPath="$(OutputDir)Signing.log" |
37 |
| - ToolsPath="$(SigningToolsPath)" /> |
38 | 27 | </Target>
|
39 | 28 |
|
40 | 29 | <Target Name="netstandard20">
|
41 | 30 | <Message Importance="high" Text="Sign: netstandard20 started" />
|
42 |
| - <PropertyGroup> |
43 |
| - <OutputDir>$(Artifacts)$(Configuration)</OutputDir> |
44 |
| - </PropertyGroup> |
45 | 31 | <ItemGroup>
|
46 |
| - <NetStandard20Files Include="$(OutputDir)\netstandard2.0\Microsoft.Azure.PowerShell*.dll" Exclude="$(OutputDir)\netstandard2.0\Microsoft.Azure.PowerShell*.Test.dll" /> |
47 |
| - <NetStandard20Files Include="$(OutputDir)\netcoreapp2.1\Microsoft.Azure.PowerShell*.dll" Exclude="$(OutputDir)\netcoreapp2.1\Microsoft.Azure.PowerShell*.Test.dll" /> |
| 32 | + <UnsignedFiles Include="$(OutputDir)netstandard2.0\Microsoft.Azure.PowerShell*.dll" Exclude="$(OutputDir)netstandard2.0\Microsoft.Azure.PowerShell*.Test.dll" /> |
48 | 33 | </ItemGroup>
|
| 34 | + </Target> |
| 35 | + |
| 36 | + <Target Name="SignFiles" AfterTargets="net452;netstandard20;All" Condition="'$(DisableSigning)' != 'true'"> |
| 37 | + <Message Importance="high" Text="Sign: task started" /> |
49 | 38 | <CodeSigningTask
|
50 | 39 | Description="$(Description)"
|
51 | 40 | Keywords="$(Keywords)"
|
52 |
| - UnsignedFiles="@(NetStandard20Files)" |
| 41 | + UnsignedFiles="@(UnsignedFiles)" |
53 | 42 | DestinationPath="$(OutputDir)"
|
54 | 43 | BasePath="$(OutputDir)"
|
55 | 44 | Certificates="$(Certificates)"
|
56 | 45 | SigningLogPath="$(OutputDir)Signing.log"
|
57 | 46 | ToolsPath="$(SigningToolsPath)" />
|
58 | 47 | </Target>
|
59 | 48 |
|
60 |
| - <Target Name="All" DependsOnTargets="net452;netstandard20" /> |
| 49 | + <Target Name="BeforeAll"> |
| 50 | + <Message Importance="high" Text="Sign: BeforeAll started" /> |
| 51 | + <PropertyGroup> |
| 52 | + <DisableSigning>true</DisableSigning> |
| 53 | + </PropertyGroup> |
| 54 | + </Target> |
| 55 | + |
| 56 | + <Target Name="All" DependsOnTargets="BeforeAll;net452;netstandard20"> |
| 57 | + <Message Importance="high" Text="Sign: All started" /> |
| 58 | + <PropertyGroup> |
| 59 | + <DisableSigning>false</DisableSigning> |
| 60 | + </PropertyGroup> |
| 61 | + </Target> |
61 | 62 | </Project>
|
0 commit comments