|
1 | 1 | <?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="CheckSigningPaths" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | 3 | <PropertyGroup> |
4 | 4 | <Root>$(MSBuildThisFileDirectory)..\</Root> |
5 | 5 | <Configuration Condition="'$(Configuration)' == ''">Release</Configuration> |
6 | 6 | <Artifacts>$(Root)artifacts\</Artifacts> |
7 | 7 | <OutputDir>$(Artifacts)$(Configuration)\</OutputDir> |
8 | | - <!-- CISignRepo is an environment variable that points to ci-signing repo clone --> |
9 | | - <CISignRepoPath>$(CISignRepo)</CISignRepoPath> |
10 | | - <PowerShellCommand Condition=" '$(PowerShellCommand)' == '' ">C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShellCommand> |
11 | | - <PowerShellCommandPrefix>"$(PowerShellCommand)" -NonInteractive -NoLogo -NoProfile -Command</PowerShellCommandPrefix> |
| 8 | + <PowerShell>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</PowerShell> |
12 | 9 | </PropertyGroup> |
13 | 10 |
|
14 | | - <Target Name="CheckSigningToolsPath"> |
| 11 | + <Target Name="CheckSigningPaths"> |
| 12 | + <Error Text="SigningToolsPath is not assigned a file path!" Condition="'$(SigningToolsPath)' == ''" /> |
| 13 | + <Error Text="The SigningToolsPath directory does not exist!" Condition="!Exists($(SigningToolsPath))" /> |
15 | 14 | <Error Text="CISignRepoPath is not assigned a file path!" Condition="'$(CISignRepoPath)' == ''" /> |
16 | 15 | <Error Text="The CISignRepoPath directory does not exist!" Condition="!Exists($(CISignRepoPath))" /> |
17 | 16 | </Target> |
|
41 | 40 | CopyBackSignedFilesToOriginalLocation="true" |
42 | 41 | UnsignedFileList="@(UnsignedFiles)" |
43 | 42 | SignLogDirPath="$(OutputDir)Signing.log" /> |
44 | | - <Exec Command="$(PowerShellCommandPrefix) "Get-ChildItem -Path $(OutputDir) -Recurse -Include 'Signed','Unsigned' | Remove-Item -Recurse -Force -Confirm:$false -ErrorAction Ignore"" |
45 | | - ContinueOnError="WarnAndContinue" |
46 | | - IgnoreExitCode="true" /> |
| 43 | + <PropertyGroup> |
| 44 | + <RemoveSignedUnsignedFolders>Get-ChildItem -Path $(OutputDir) -Recurse -Include 'Signed','Unsigned' | Remove-Item -Recurse -Force -Confirm:$false -ErrorAction Ignore</RemoveSignedUnsignedFolders> |
| 45 | + </PropertyGroup> |
| 46 | + <Exec Command="$(PowerShell) -NonInteractive -NoLogo -NoProfile -Command "$(RemoveSignedUnsignedFolders)"" ContinueOnError="WarnAndContinue" IgnoreExitCode="true" /> |
47 | 47 | </Target> |
48 | 48 |
|
49 | 49 | <Target Name="BeforeAll"> |
|
0 commit comments