@@ -111,7 +111,7 @@ if ($PSVersionTable.PSEdition -ne "Core") {
111
111
Add-Type - Assembly System.IO.Compression.FileSystem
112
112
}
113
113
114
- function Get -NugetAsmForRuntime {
114
+ function Restore -NugetAsmForRuntime {
115
115
param (
116
116
[ValidateNotNull ()][string ]$PackageName ,
117
117
[ValidateNotNull ()][string ]$PackageVersion ,
@@ -135,7 +135,8 @@ function Get-NugetAsmForRuntime {
135
135
136
136
$packageDirPath = Join-Path $tmpDir " $PackageName .$PackageVersion "
137
137
if (-not (Test-Path $packageDirPath )) {
138
- $tmpNupkgPath = Join-Path $tmpDir ' tmp.zip'
138
+ $guid = New-Guid
139
+ $tmpNupkgPath = Join-Path $tmpDir " $guid .zip"
139
140
if (Test-Path $tmpNupkgPath ) {
140
141
Remove-Item - Force $tmpNupkgPath
141
142
}
@@ -267,9 +268,9 @@ task GetProductVersion -Before PackageNuGet, PackageModule, UploadArtifacts {
267
268
}
268
269
269
270
task Build {
271
+ exec { & $script :dotnetExe publish - c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f $script :TargetPlatform }
270
272
exec { & $script :dotnetExe publish - c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f $script :TargetPlatform }
271
273
exec { & $script :dotnetExe build - c $Configuration .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj $script :TargetFrameworksParam }
272
- exec { & $script :dotnetExe publish - c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f $script :TargetPlatform }
273
274
}
274
275
275
276
function UploadTestLogs {
@@ -296,12 +297,10 @@ task TestServer {
296
297
Set-Location .\test\PowerShellEditorServices.Test\
297
298
298
299
if (-not $script :IsUnix ) {
299
- exec { & $script :dotnetExe build -f $script :TestRuntime.Desktop }
300
300
exec { & $script :dotnetExe xunit -f $script :TestRuntime.Desktop }
301
301
}
302
302
303
303
Invoke-WithCreateDefaultHook - NewModulePath $script :PSCoreModulePath {
304
- exec { & $script :dotnetExe build - c $Configuration -f $script :TestRuntime.Core }
305
304
exec { & $script :dotnetExe xunit -f $script :TestRuntime.Core -- fx- version $script :NetCoreTestingFrameworkVersion }
306
305
}
307
306
}
@@ -310,17 +309,15 @@ task TestProtocol {
310
309
Set-Location .\test\PowerShellEditorServices.Test.Protocol\
311
310
312
311
if (-not $script :IsUnix ) {
313
- exec { & $script :dotnetExe build -f $script :TestRuntime.Desktop }
314
312
exec { & $script :dotnetExe xunit -f $script :TestRuntime.Desktop }
315
313
}
316
314
317
315
Invoke-WithCreateDefaultHook {
318
- exec { & $script :dotnetExe build - c $Configuration -f $script :TestRuntime.Core }
319
316
exec { & $script :dotnetExe xunit -f $script :TestRuntime.Core -- fx- version $script :NetCoreTestingFrameworkVersion }
320
317
}
321
318
}
322
319
323
- task TestHost - If {
320
+ task TestHost {
324
321
Set-Location .\test\PowerShellEditorServices.Test.Host\
325
322
326
323
if (-not $script :IsUnix ) {
@@ -375,7 +372,7 @@ task LayoutModule -After Build {
375
372
}
376
373
377
374
foreach ($packageDetails in $script :RequiredNugetBinaries [$binDestinationDir ]) {
378
- Get -NugetAsmForRuntime - DestinationPath $binDestPath @packageDetails
375
+ Restore -NugetAsmForRuntime - DestinationPath $binDestPath @packageDetails
379
376
}
380
377
}
381
378
}
0 commit comments