|
240 | 240 | DestinationFolder="$(LibrarySourceFolder)\StackAdmin\AzureStack" Condition= " '$(NetCore)' == 'false' and '$(Stack)' == 'true' "/>
|
241 | 241 | <!-- moved copy tasks -->
|
242 | 242 |
|
| 243 | + <Exec Command=""$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command ". Register-PSRepository -Name MSIcreationrepository -SourceLocation $(PackageDirectory) -InstallationPolicy Trusted " " Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'"/> |
| 244 | + <Exec Command=""$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command ". $(LibraryRoot)\setup\generate.ps1 -version 5.0.0 -force -repository MSIcreationrepository " " Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'"/> |
| 245 | + <CallTarget Targets="CodeSignInstaller" |
| 246 | + Condition=" '$(CodeSign)' == 'true' and '$(Scope)' == 'all'" /> |
| 247 | + |
243 | 248 | <Message Importance="high" Text="Running Static Analyser" />
|
244 | 249 | <CallTarget targets="DependencyAnalysis" ContinueOnError="ErrorAndContinue" />
|
245 | 250 | <Exec Command=""$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command ". $(LibraryToolsFolder)\CleanupBuild.ps1 -BuildConfig $(Configuration) "" />
|
|
413 | 418 | DestinationFolder="$(LibraryRoot)tools\AzureRM.NetCore" Condition= " '$(NetCore)' == 'true' "/>
|
414 | 419 | </Target>
|
415 | 420 |
|
| 421 | + <Target Name="CodeSignInstaller"> |
| 422 | + <PropertyGroup> |
| 423 | + <!--public token associated with MSSharedLibKey.snk--> |
| 424 | + <StrongNameToken Condition=" '$(StrongNameToken)' == '' ">31bf3856ad364e35</StrongNameToken> |
| 425 | + </PropertyGroup> |
| 426 | + <GetFrameworkSdkPath> |
| 427 | + <Output TaskParameter="Path" PropertyName="WindowsSdkPath"/> |
| 428 | + </GetFrameworkSdkPath> |
| 429 | + |
| 430 | + <ItemGroup> |
| 431 | + <InstallersToSign Include="$(LibraryRoot)\setup\*.msi" /> |
| 432 | + </ItemGroup> |
| 433 | + |
| 434 | + <Message Importance="high" Text="$(LibraryRoot)\setup does not contains any installers to sign. Code sign will skip." |
| 435 | + Condition="'@(InstallersToSign)' == ''" /> |
| 436 | + |
| 437 | + <CodeSigningTask |
| 438 | + Description="Microsoft Azure PowerShell" |
| 439 | + Keywords="Microsoft Azure PowerShell" |
| 440 | + UnsignedFiles="@(InstallersToSign)" |
| 441 | + DestinationPath="$(SignedOutputRootDir)" |
| 442 | + SigningLogPath="$(LibraryRoot)\msi-signing.log" |
| 443 | + Certificates="402" |
| 444 | + ToolsPath="$(CIToolsPath)" |
| 445 | + Condition="!$(DelaySign) and '@(InstallersToSign)' != ''"/> |
| 446 | + |
| 447 | + <!--If we are testing locally then we copy the binaries and do not submit to the code sign server--> |
| 448 | + <Copy SourceFiles="@(InstallersToSign)" DestinationFolder="signed" Condition="$(DelaySign)" /> |
| 449 | + <SetEnvVar EnvName="SignedMsiDir" EnvValue="$(SignedOutputRootDir)" /> |
| 450 | + </Target> |
| 451 | + |
416 | 452 | <!-- Run Dependecy Analyzer -->
|
417 | 453 | <Target Name="DependencyAnalysis">
|
418 | 454 | <MSBuild
|
|
0 commit comments