1919 [string []]$TestArgs = @ (" --logger" , " trx" )
2020)
2121
22- # Requires -Modules @ {ModuleName = " InvokeBuild" ;ModuleVersion = " 3.2.1" }
22+ # Requires -Modules @ {ModuleName = " InvokeBuild" ; ModuleVersion = " 5.0.0" }
23+ # Requires -Modules @ {ModuleName = " platyPS" ; ModuleVersion = " 0.14.0" }
2324
2425$script :dotnetTestArgs = @ (
2526 " test"
@@ -107,8 +108,7 @@ task CreateBuildInfo {
107108 $propsBody = $propsXml.Project.PropertyGroup
108109 $buildVersion = $propsBody.VersionPrefix
109110
110- if ($propsBody.VersionSuffix )
111- {
111+ if ($propsBody.VersionSuffix ) {
112112 $buildVersion += ' -' + $propsBody.VersionSuffix
113113 }
114114 }
@@ -214,8 +214,7 @@ task LayoutModule -After Build {
214214 $psesCoreHostPath = " $psesBinOutputPath /Core"
215215 $psesDeskHostPath = " $psesBinOutputPath /Desktop"
216216
217- foreach ($dir in $psesDepsPath , $psesCoreHostPath , $psesDeskHostPath , $psesVSCodeBinOutputPath )
218- {
217+ foreach ($dir in $psesDepsPath , $psesCoreHostPath , $psesDeskHostPath , $psesVSCodeBinOutputPath ) {
219218 New-Item - Force - Path $dir - ItemType Directory
220219 }
221220
@@ -228,56 +227,46 @@ task LayoutModule -After Build {
228227 [void ]$includedDlls.Add (' System.Management.Automation.dll' )
229228
230229 # PSES/bin/Common
231- foreach ($psesComponent in Get-ChildItem $script :PsesOutput )
232- {
230+ foreach ($psesComponent in Get-ChildItem $script :PsesOutput ) {
233231 if ($psesComponent.Name -eq ' System.Management.Automation.dll' -or
234- $psesComponent.Name -eq ' System.Runtime.InteropServices.RuntimeInformation.dll' )
235- {
232+ $psesComponent.Name -eq ' System.Runtime.InteropServices.RuntimeInformation.dll' ) {
236233 continue
237234 }
238235
239- if ($psesComponent.Extension )
240- {
236+ if ($psesComponent.Extension ) {
241237 [void ]$includedDlls.Add ($psesComponent.Name )
242238 Copy-Item - Path $psesComponent.FullName - Destination $psesDepsPath - Force
243239 }
244240 }
245241
246242 # PSES/bin/Core
247- foreach ($hostComponent in Get-ChildItem $script :HostCoreOutput )
248- {
249- if (-not $includedDlls.Contains ($hostComponent.Name ))
250- {
243+ foreach ($hostComponent in Get-ChildItem $script :HostCoreOutput ) {
244+ if (-not $includedDlls.Contains ($hostComponent.Name )) {
251245 Copy-Item - Path $hostComponent.FullName - Destination $psesCoreHostPath - Force
252246 }
253247 }
254248
255249 # PSES/bin/Desktop
256- if (-not $script :IsNix )
257- {
258- foreach ($hostComponent in Get-ChildItem $script :HostDeskOutput )
259- {
260- if (-not $includedDlls.Contains ($hostComponent.Name ))
261- {
250+ if (-not $script :IsNix ) {
251+ foreach ($hostComponent in Get-ChildItem $script :HostDeskOutput ) {
252+ if (-not $includedDlls.Contains ($hostComponent.Name )) {
262253 Copy-Item - Path $hostComponent.FullName - Destination $psesDeskHostPath - Force
263254 }
264255 }
265256 }
266257
267258 # Assemble the PowerShellEditorServices.VSCode module
268259
269- foreach ($vscodeComponent in Get-ChildItem $script :VSCodeOutput )
270- {
271- if (-not $includedDlls.Contains ($vscodeComponent.Name ))
272- {
260+ foreach ($vscodeComponent in Get-ChildItem $script :VSCodeOutput ) {
261+ if (-not $includedDlls.Contains ($vscodeComponent.Name )) {
273262 Copy-Item - Path $vscodeComponent.FullName - Destination $psesVSCodeBinOutputPath - Force
274263 }
275264 }
276265}
277266
278267task RestorePsesModules - After Build {
279268 $submodulePath = (Resolve-Path $PsesSubmodulePath ).Path + [IO.Path ]::DirectorySeparatorChar
280- Write-Host " `n Restoring EditorServices modules..."
269+ Write-Host " Restoring EditorServices modules..."
281270
282271 # Read in the modules.json file as a hashtable so it can be splatted
283272 $moduleInfos = @ {}
@@ -327,14 +316,12 @@ task RestorePsesModules -After Build {
327316
328317 Save-Module @splatParameters
329318 }
330-
331- Write-Host " `n "
332319}
333320
334- task BuildCmdletHelp {
321+ Task BuildCmdletHelp - After LayoutModule {
335322 New-ExternalHelp - Path $PSScriptRoot \module\docs - OutputPath $PSScriptRoot \module\PowerShellEditorServices\Commands\en- US - Force
336323 New-ExternalHelp - Path $PSScriptRoot \module\PowerShellEditorServices.VSCode\docs - OutputPath $PSScriptRoot \module\PowerShellEditorServices.VSCode\en- US - Force
337324}
338325
339326# The default task is to run the entire CI build
340- task . Clean , Build, Test, BuildCmdletHelp
327+ task . Clean , Build, Test
0 commit comments