Skip to content

Commit 515d1a7

Browse files
authored
Merge pull request #58 from Azure/signing-consolidation
Signing consolidation
2 parents dc4b1cc + 3c9c38f commit 515d1a7

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

build/sign.proj

+26-25
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,61 @@
22
<Project ToolsVersion="14.0" DefaultTargets="All" InitialTargets="CheckSigningToolsPath" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Root>$(MSBuildThisFileDirectory)..\</Root>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
5+
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
66
<Artifacts>$(Root)artifacts\</Artifacts>
77
<Description>Microsoft Azure PowerShell Common</Description>
88
<Keywords>Microsoft Azure PowerShell Common</Keywords>
99
<Certificates>72, 400</Certificates>
10+
<OutputDir>$(Artifacts)$(Configuration)\</OutputDir>
1011
</PropertyGroup>
1112

12-
<UsingTask TaskName="CodeSigningTask" AssemblyFile="$(SigningToolsPath)\Microsoft.WindowsAzure.Tools.Build.Tasks.OnPremise.dll" />
13-
<Import Project="$(SigningToolsPath)\Microsoft.WindowsAzure.Build.OnPremise.msbuild" />
14-
1513
<Target Name="CheckSigningToolsPath">
1614
<Error Text="SigningToolsPath is not assigned a file path!" Condition="'$(SigningToolsPath)' == ''" />
1715
<Error Text="The SigningToolsPath directory does not exist!" Condition="!Exists($(SigningToolsPath))" />
1816
</Target>
1917

18+
<UsingTask TaskName="CodeSigningTask" AssemblyFile="$(SigningToolsPath)\Microsoft.WindowsAzure.Tools.Build.Tasks.OnPremise.dll" />
19+
<Import Project="$(SigningToolsPath)\Microsoft.WindowsAzure.Build.OnPremise.msbuild" />
20+
2021
<Target Name="net452">
2122
<Message Importance="high" Text="Sign: net452 started" />
22-
<PropertyGroup>
23-
<OutputDir>$(Artifacts)$(Configuration)\net452\</OutputDir>
24-
</PropertyGroup>
2523
<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" />
2826
</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)" />
3827
</Target>
3928

4029
<Target Name="netstandard20">
4130
<Message Importance="high" Text="Sign: netstandard20 started" />
42-
<PropertyGroup>
43-
<OutputDir>$(Artifacts)$(Configuration)</OutputDir>
44-
</PropertyGroup>
4531
<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" />
4833
</ItemGroup>
34+
</Target>
35+
36+
<Target Name="SignFiles" AfterTargets="net452;netstandard20;All" Condition="'$(DisableSigning)' != 'true'">
37+
<Message Importance="high" Text="Sign: task started" />
4938
<CodeSigningTask
5039
Description="$(Description)"
5140
Keywords="$(Keywords)"
52-
UnsignedFiles="@(NetStandard20Files)"
41+
UnsignedFiles="@(UnsignedFiles)"
5342
DestinationPath="$(OutputDir)"
5443
BasePath="$(OutputDir)"
5544
Certificates="$(Certificates)"
5645
SigningLogPath="$(OutputDir)Signing.log"
5746
ToolsPath="$(SigningToolsPath)" />
5847
</Target>
5948

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>
6162
</Project>

0 commit comments

Comments
 (0)