Skip to content

Commit d31f62c

Browse files
authored
Clean up some cruft files on Windows releases (#2248)
Improve the handling of output paths and build artifacts in the Windows installer build pipeline. We accidentally started including some code signing summary report files in the output zip archives on Windows - let's delete those. Also I noticed that local builds were now outputting the Windows installers to the payload directory, rather than the expected output path. This is because now that we specify a RID we were getting the RID appended to the output path (which would then be the same as the payload path.. what a coincidence!). Finally let's be a bit more robust with the path-math in our layout.ps1 script - we should not assume if the path has the trailing slash or not. (Note that in MSBuild, the convention is that directory path variables should end with a slash.)
2 parents 4dab77f + 2d4143e commit d31f62c

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.azure-pipelines/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ extends:
197197
"Parameters": {}
198198
}
199199
]
200+
- task: PowerShell@2
201+
displayName: 'Clean up code signing artifacts'
202+
inputs:
203+
targetType: inline
204+
script: |
205+
Remove-Item "$(Build.ArtifactStagingDirectory)\payload\CodeSignSummary-*.md"
200206
- task: PowerShell@2
201207
displayName: 'Build installers'
202208
inputs:

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
shell: bash
5252
run: |
5353
mkdir -p artifacts/bin
54-
mv out/windows/Installer.Windows/bin/Release/net472/${{ matrix.runtime }}/gcm*.exe artifacts/
54+
mv out/windows/Installer.Windows/bin/Release/net472/gcm*.exe artifacts/
5555
mv out/windows/Installer.Windows/bin/Release/net472/${{ matrix.runtime }} artifacts/bin/
5656
cp out/windows/Installer.Windows/bin/Release/net472/${{ matrix.runtime }}.sym/* artifacts/bin/${{ matrix.runtime }}/
5757

src/windows/Installer.Windows/Installer.Windows.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
<TargetFramework>net472</TargetFramework>
1414
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1515
<EnableDefaultItems>false</EnableDefaultItems>
16-
<PayloadPath>$(PlatformOutPath)Installer.Windows\bin\$(Configuration)\net472\$(RuntimeIdentifier)</PayloadPath>
16+
<PayloadPath>$(PlatformOutPath)Installer.Windows\bin\$(Configuration)\net472\$(RuntimeIdentifier)\</PayloadPath>
1717
<InnoSetupVersion>6.3.1</InnoSetupVersion>
18+
<!-- We already append the RID to our intermediate PayloadPath and also to the
19+
final installer filenames so there's no need to append to the output path. -->
20+
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
1821
</PropertyGroup>
1922

2023
<ItemGroup>

src/windows/Installer.Windows/layout.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Inputs
22
param ([Parameter(Mandatory)] $Configuration, [Parameter(Mandatory)] $Output, $RuntimeIdentifier, $SymbolOutput)
33

4+
# Trim trailing slashes from output paths
5+
$Output = $Output.TrimEnd('\','/')
6+
$SymbolOutput = $SymbolOutput.TrimEnd('\','/')
7+
48
Write-Output "Output: $Output"
59

610
# Determine a runtime if one was not provided

0 commit comments

Comments
 (0)