Skip to content

Commit b7c5567

Browse files
authored
Merge pull request Azure#110 from vladimir-shcherbakov/master-ESRP
ESRP codesign
2 parents 6b46d6b + fbf9929 commit b7c5567

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

build/sign.proj

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="14.0" DefaultTargets="All" InitialTargets="CheckSigningToolsPath" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="14.0" DefaultTargets="All" InitialTargets="CheckCISignRepo" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Root>$(MSBuildThisFileDirectory)..\</Root>
55
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
66
<Artifacts>$(Root)artifacts\</Artifacts>
7-
<Description>Microsoft Azure PowerShell Common</Description>
8-
<Keywords>Microsoft Azure PowerShell Common</Keywords>
9-
<Certificates>72, 400</Certificates>
107
<OutputDir>$(Artifacts)$(Configuration)\</OutputDir>
8+
<PowerShell>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShell>
119
</PropertyGroup>
1210

13-
<Target Name="CheckSigningToolsPath">
14-
<Error Text="SigningToolsPath is not assigned a file path!" Condition="'$(SigningToolsPath)' == ''" />
15-
<Error Text="The SigningToolsPath directory does not exist!" Condition="!Exists($(SigningToolsPath))" />
11+
<Target Name="CheckCISignRepo">
12+
<Error Text="CISignRepo is not assigned a file path!" Condition="'$(CISignRepo)' == ''" />
13+
<Error Text="The CISignRepo directory does not exist!" Condition="!Exists($(CISignRepo))" />
1614
</Target>
1715

18-
<UsingTask TaskName="CodeSigningTask" AssemblyFile="$(SigningToolsPath)\Microsoft.WindowsAzure.Tools.Build.Tasks.OnPremise.dll" />
19-
<Import Project="$(SigningToolsPath)\Microsoft.WindowsAzure.Build.OnPremise.msbuild" />
16+
<UsingTask TaskName="ESRPSignTask" AssemblyFile="$(CISignRepo)\tools\sdkbuildtools\tasks\MS.Az.Sdk.OnPremise.Build.Tasks.dll" />
2017

2118
<Target Name="net452">
2219
<Message Importance="high" Text="Sign: net452 started" />
@@ -36,15 +33,14 @@
3633

3734
<Target Name="SignFiles" AfterTargets="net452;netstandard20;All" Condition="'$(DisableSigning)' != 'true'">
3835
<Message Importance="high" Text="Sign: task started" />
39-
<CodeSigningTask
40-
Description="$(Description)"
41-
Keywords="$(Keywords)"
42-
UnsignedFiles="@(UnsignedFiles)"
43-
DestinationPath="$(OutputDir)"
44-
BasePath="$(OutputDir)"
45-
Certificates="$(Certificates)"
46-
SigningLogPath="$(OutputDir)Signing.log"
47-
ToolsPath="$(SigningToolsPath)" />
36+
<ESRPSignTask
37+
CopyBackSignedFilesToOriginalLocation="true"
38+
UnsignedFileList="@(UnsignedFiles)"
39+
SignLogDirPath="$(OutputDir)Signing.log" />
40+
<PropertyGroup>
41+
<RemoveSignedUnsignedFolders>Get-ChildItem -Path $(OutputDir) -Recurse -Include 'Signed','Unsigned' | Remove-Item -Recurse -Force -Confirm:$false -ErrorAction Ignore</RemoveSignedUnsignedFolders>
42+
</PropertyGroup>
43+
<Exec Command="$(PowerShell) -NonInteractive -NoLogo -NoProfile -Command &quot;$(RemoveSignedUnsignedFolders)&quot;" ContinueOnError="WarnAndContinue" IgnoreExitCode="true" />
4844
</Target>
4945

5046
<Target Name="BeforeAll">

0 commit comments

Comments
 (0)