19
19
[string []]$TestArgs = @ (" --logger" , " trx" )
20
20
)
21
21
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" }
23
24
24
25
$script :dotnetTestArgs = @ (
25
26
" test"
@@ -107,8 +108,7 @@ task CreateBuildInfo {
107
108
$propsBody = $propsXml.Project.PropertyGroup
108
109
$buildVersion = $propsBody.VersionPrefix
109
110
110
- if ($propsBody.VersionSuffix )
111
- {
111
+ if ($propsBody.VersionSuffix ) {
112
112
$buildVersion += ' -' + $propsBody.VersionSuffix
113
113
}
114
114
}
@@ -214,8 +214,7 @@ task LayoutModule -After Build {
214
214
$psesCoreHostPath = " $psesBinOutputPath /Core"
215
215
$psesDeskHostPath = " $psesBinOutputPath /Desktop"
216
216
217
- foreach ($dir in $psesDepsPath , $psesCoreHostPath , $psesDeskHostPath , $psesVSCodeBinOutputPath )
218
- {
217
+ foreach ($dir in $psesDepsPath , $psesCoreHostPath , $psesDeskHostPath , $psesVSCodeBinOutputPath ) {
219
218
New-Item - Force - Path $dir - ItemType Directory
220
219
}
221
220
@@ -228,56 +227,46 @@ task LayoutModule -After Build {
228
227
[void ]$includedDlls.Add (' System.Management.Automation.dll' )
229
228
230
229
# PSES/bin/Common
231
- foreach ($psesComponent in Get-ChildItem $script :PsesOutput )
232
- {
230
+ foreach ($psesComponent in Get-ChildItem $script :PsesOutput ) {
233
231
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' ) {
236
233
continue
237
234
}
238
235
239
- if ($psesComponent.Extension )
240
- {
236
+ if ($psesComponent.Extension ) {
241
237
[void ]$includedDlls.Add ($psesComponent.Name )
242
238
Copy-Item - Path $psesComponent.FullName - Destination $psesDepsPath - Force
243
239
}
244
240
}
245
241
246
242
# 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 )) {
251
245
Copy-Item - Path $hostComponent.FullName - Destination $psesCoreHostPath - Force
252
246
}
253
247
}
254
248
255
249
# 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 )) {
262
253
Copy-Item - Path $hostComponent.FullName - Destination $psesDeskHostPath - Force
263
254
}
264
255
}
265
256
}
266
257
267
258
# Assemble the PowerShellEditorServices.VSCode module
268
259
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 )) {
273
262
Copy-Item - Path $vscodeComponent.FullName - Destination $psesVSCodeBinOutputPath - Force
274
263
}
275
264
}
276
265
}
277
266
278
267
task RestorePsesModules - After Build {
279
268
$submodulePath = (Resolve-Path $PsesSubmodulePath ).Path + [IO.Path ]::DirectorySeparatorChar
280
- Write-Host " `n Restoring EditorServices modules..."
269
+ Write-Host " Restoring EditorServices modules..."
281
270
282
271
# Read in the modules.json file as a hashtable so it can be splatted
283
272
$moduleInfos = @ {}
@@ -327,14 +316,12 @@ task RestorePsesModules -After Build {
327
316
328
317
Save-Module @splatParameters
329
318
}
330
-
331
- Write-Host " `n "
332
319
}
333
320
334
- task BuildCmdletHelp {
321
+ Task BuildCmdletHelp - After LayoutModule {
335
322
New-ExternalHelp - Path $PSScriptRoot \module\docs - OutputPath $PSScriptRoot \module\PowerShellEditorServices\Commands\en- US - Force
336
323
New-ExternalHelp - Path $PSScriptRoot \module\PowerShellEditorServices.VSCode\docs - OutputPath $PSScriptRoot \module\PowerShellEditorServices.VSCode\en- US - Force
337
324
}
338
325
339
326
# The default task is to run the entire CI build
340
- task . Clean , Build, Test, BuildCmdletHelp
327
+ task . Clean , Build, Test
0 commit comments