Skip to content

Commit 145bdf4

Browse files
committed
Add assertion to build that PSES bits are built in release configuration
Because it's way too easier to break that! We were building in release configuration, then running the tests...and the tests were then building (and overwriting the bits) in debug configuration.
1 parent 1829acb commit 145bdf4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.vsts-ci/templates/ci-general.yml

+12
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ steps:
7070
workingDirectory: $(Build.SourcesDirectory)/vscode-powershell
7171
pwsh: ${{ parameters.pwsh }}
7272

73+
- task: PowerShell@2
74+
displayName: Assert PowerShellEditorServices release configuration
75+
inputs:
76+
targetType: inline
77+
script: |
78+
$assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/vscode-powershell/modules/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll")
79+
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
80+
Write-Host "##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!"
81+
exit 1
82+
}
83+
pwsh: ${{ parameters.pwsh }}
84+
7385
- publish: $(vsixPath)
7486
artifact: vscode-powershell-vsix-$(System.JobId)
7587
displayName: Publish extension artifact

0 commit comments

Comments
 (0)