Skip to content

Commit 417fe5c

Browse files
authored
Update the release build to work with new module artifacts (#1930)
- Use a new builder pool, which has the latest PowerShell 7.0.3 available. - Remove catalog related steps, as the catalog file is unnecessary to PowerShell Gallery now. - Update the signing xml file to sign the new "Polyfiller" assemblies.
1 parent fd1265e commit 417fe5c

File tree

4 files changed

+5
-55
lines changed

4 files changed

+5
-55
lines changed

.vsts-ci/releaseBuild.yml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resources:
1717

1818
jobs:
1919
- job: build_windows
20-
pool: Package ES Lab A
20+
pool: Package ES CodeHub Lab E
2121

2222
# APIScan can take a long time
2323
timeoutInMinutes: 240
@@ -86,39 +86,14 @@ jobs:
8686
- pwsh: |
8787
# Show the signed files
8888
Get-ChildItem -Path $(Signed)
89-
Copy-Item -Path $(Signed)\* -Destination $(PSReadLine) -Force
89+
Copy-Item -Path $(Signed)\* -Destination $(PSReadLine) -Recurse -Force
9090
displayName: 'Replace unsigned files with signed ones'
9191
92-
# Create catalog file from the signed modules files
93-
- pwsh: |
94-
New-FileCatalog -CatalogFilePath $(PSReadLine)\PSReadLine.cat -Path $(PSReadLine) -CatalogVersion 2.0 | `
95-
ForEach-Object -MemberName FullName
96-
displayName: 'Create catalog file'
97-
98-
# Sign the catalog file
99-
- task: PkgESCodeSign@10
100-
displayName: 'CodeSign - catalog file'
101-
env:
102-
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
103-
inputs:
104-
signConfigXml: '$(Build.SourcesDirectory)\.vsts-ci\sign-catalog.xml'
105-
inPathRoot: '$(PSReadLine)'
106-
outPathRoot: '$(Signed)'
107-
binVersion: Production
108-
binVersionOverride: ''
109-
110-
# Copy the signed catalog file over
111-
- pwsh: |
112-
# Show the signed files
113-
Get-ChildItem -Path $(Signed)
114-
Copy-Item -Path $(Signed)\PSReadLine.cat -Destination $(PSReadLine) -Force
115-
displayName: 'Replace catalog file with the signed one'
116-
11792
# Verify the signatures
11893
- pwsh: |
11994
$HasInvalidFiles = $false
12095
$WrongCert = @{}
121-
Get-ChildItem -Path $(PSReadLine) -Recurse -Include "*.dll","*.ps*1*","*.cat" | `
96+
Get-ChildItem -Path $(PSReadLine) -Recurse -Include "*.dll","*.ps*1*" | `
12297
Get-AuthenticodeSignature | ForEach-Object {
12398
$_ | Select-Object Path, Status
12499
if ($_.Status -ne 'Valid') { $HasInvalidFiles = $true }
@@ -134,12 +109,6 @@ jobs:
134109
}
135110
displayName: 'Verify the signed files'
136111
137-
- pwsh: |
138-
$CatInfo = Test-FileCatalog -Path $(PSReadLine) -CatalogFilePath $(PSReadLine)\PSReadLine.cat -Detailed
139-
$CatInfo | Format-List
140-
if ($CatInfo.Status -ne "Valid") { throw "Catalog file is invalid." }
141-
displayName: 'Verify the catalog file'
142-
143112
- pwsh: |
144113
try {
145114
$RepoName = "PSRLLocal"

.vsts-ci/sign-catalog.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.vsts-ci/sign-module-files.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<file src="__INPATHROOT__\PSReadLine.format.ps1xml" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\PSReadLine.format.ps1xml" />
1010

1111
<file src="__INPATHROOT__\Microsoft.PowerShell.PSReadLine2.dll" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\Microsoft.PowerShell.PSReadLine2.dll" />
12-
<file src="__INPATHROOT__\System.Runtime.InteropServices.RuntimeInformation.dll" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\System.Runtime.InteropServices.RuntimeInformation.dll" />
12+
<file src="__INPATHROOT__\net461\Microsoft.PowerShell.PSReadLine.Polyfiller.dll" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\net461\Microsoft.PowerShell.PSReadLine.Polyfiller.dll" />
13+
<file src="__INPATHROOT__\net5.0\Microsoft.PowerShell.PSReadLine.Polyfiller.dll" signType="AuthenticodeFormer" dest="__OUTPATHROOT__\net5.0\Microsoft.PowerShell.PSReadLine.Polyfiller.dll" />
1314
</job>
1415
</SignConfigXML>

PSReadLine.build.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,6 @@ task BuildMockPSConsole @mockPSConsoleParams {
9191
exec { dotnet publish -f $Framework -c $Configuration MockPSConsole }
9292
}
9393

94-
<#
95-
Synopsis: Generate the file catalog
96-
#>
97-
task GenerateCatalog {
98-
exec {
99-
Remove-Item -ea Ignore $PSScriptRoot/bin/$Configuration/PSReadLine/PSReadLine.cat
100-
$null = New-FileCatalog -CatalogFilePath $PSScriptRoot/bin/$Configuration/PSReadLine/PSReadLine.cat `
101-
-Path $PSScriptRoot/bin/$Configuration/PSReadLine `
102-
-CatalogVersion 2.0
103-
}
104-
}
105-
10694
<#
10795
Synopsis: Run the unit tests
10896
#>

0 commit comments

Comments
 (0)