-
Notifications
You must be signed in to change notification settings - Fork 234
Migrate to netstandard2.0 and PSStandard #741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
dc7cae2
624f7fe
3cda894
187aea6
bdf008e
3ba9c0a
3567a2d
15dcb61
e622473
a929752
05d2f44
f5114c8
e189f87
f220082
071b7e0
9304ba0
8fc5b68
7146a05
d9f3168
66bf56f
6fac967
7651f0f
f8f60bd
1525ff8
88639c5
d8f4b2e
32b770f
395771e
f5cfe42
02ee0e8
b8482c5
063dadc
25c322b
0a66601
d5cbd9a
e1d0ac3
e978b7c
3c13822
f8c462c
38bce43
12b4cb6
b47d915
8b86ac9
0bac8b6
4297563
59edb3c
865dc97
32e13fe
514ccf0
2f870b7
ff1b14d
05ed5b5
8677a7a
f08b6a9
da2e0b0
cdccf3a
354da07
6a60e46
e7a3cc9
6cc0fb3
3462b23
f9d3018
86601f4
3511ed6
c69610e
131e51f
271df79
d99fbb6
784cef5
71c9ee9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,7 +111,7 @@ if ($PSVersionTable.PSEdition -ne "Core") { | |
Add-Type -Assembly System.IO.Compression.FileSystem | ||
} | ||
|
||
function Get-NugetAsmForRuntime { | ||
function Restore-NugetAsmForRuntime { | ||
param( | ||
[ValidateNotNull()][string]$PackageName, | ||
[ValidateNotNull()][string]$PackageVersion, | ||
|
@@ -135,7 +135,8 @@ function Get-NugetAsmForRuntime { | |
|
||
$packageDirPath = Join-Path $tmpDir "$PackageName.$PackageVersion" | ||
if (-not (Test-Path $packageDirPath)) { | ||
$tmpNupkgPath = Join-Path $tmpDir 'tmp.zip' | ||
$guid = New-Guid | ||
$tmpNupkgPath = Join-Path $tmpDir "$guid.zip" | ||
if (Test-Path $tmpNupkgPath) { | ||
Remove-Item -Force $tmpNupkgPath | ||
} | ||
|
@@ -267,9 +268,9 @@ task GetProductVersion -Before PackageNuGet, PackageModule, UploadArtifacts { | |
} | ||
|
||
task Build { | ||
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f $script:TargetPlatform } | ||
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f $script:TargetPlatform } | ||
exec { & $script:dotnetExe build -c $Configuration .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj $script:TargetFrameworksParam } | ||
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f $script:TargetPlatform } | ||
} | ||
|
||
function UploadTestLogs { | ||
|
@@ -296,12 +297,10 @@ task TestServer { | |
Set-Location .\test\PowerShellEditorServices.Test\ | ||
|
||
if (-not $script:IsUnix) { | ||
exec { & $script:dotnetExe build -f $script:TestRuntime.Desktop } | ||
exec { & $script:dotnetExe xunit -f $script:TestRuntime.Desktop } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you use |
||
} | ||
|
||
Invoke-WithCreateDefaultHook -NewModulePath $script:PSCoreModulePath { | ||
exec { & $script:dotnetExe build -c $Configuration -f $script:TestRuntime.Core } | ||
exec { & $script:dotnetExe xunit -f $script:TestRuntime.Core --fx-version $script:NetCoreTestingFrameworkVersion } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same thing about dotnet build |
||
} | ||
} | ||
|
@@ -310,17 +309,15 @@ task TestProtocol { | |
Set-Location .\test\PowerShellEditorServices.Test.Protocol\ | ||
|
||
if (-not $script:IsUnix) { | ||
exec { & $script:dotnetExe build -f $script:TestRuntime.Desktop } | ||
exec { & $script:dotnetExe xunit -f $script:TestRuntime.Desktop } | ||
} | ||
|
||
Invoke-WithCreateDefaultHook { | ||
exec { & $script:dotnetExe build -c $Configuration -f $script:TestRuntime.Core } | ||
exec { & $script:dotnetExe xunit -f $script:TestRuntime.Core --fx-version $script:NetCoreTestingFrameworkVersion } | ||
} | ||
} | ||
|
||
task TestHost -If { | ||
task TestHost { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wait I thought these tests were evil? 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are but ideally we can restore them at some point. The build rule exists but isn't called anywhere (used to be under |
||
Set-Location .\test\PowerShellEditorServices.Test.Host\ | ||
|
||
if (-not $script:IsUnix) { | ||
|
@@ -375,7 +372,7 @@ task LayoutModule -After Build { | |
} | ||
|
||
foreach ($packageDetails in $script:RequiredNugetBinaries[$binDestinationDir]) { | ||
Get-NugetAsmForRuntime -DestinationPath $binDestPath @packageDetails | ||
Restore-NugetAsmForRuntime -DestinationPath $binDestPath @packageDetails | ||
} | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,11 +41,7 @@ public void CanResolveWorkspaceRelativePath() | |
[Fact] | ||
public void CanDetermineIsPathInMemory() | ||
{ | ||
#if !CoreCLR | ||
string tempDir = Environment.GetEnvironmentVariable("TEMP"); | ||
#else | ||
string tempDir = Path.GetTempPath(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought this worked in .NET Framework? It looked like it worked in Windows PowerShell |
||
#endif | ||
string shortDirPath = Path.Combine(tempDir, "GitHub", "PowerShellEditorServices"); | ||
string shortFilePath = Path.Combine(shortDirPath, "foo.ps1"); | ||
string shortUriForm = "git:/c%3A/Users/Keith/GitHub/dahlbyk/posh-git/src/PoshGitTypes.ps1?%7B%22path%22%3A%22c%3A%5C%5CUsers%5C%5CKeith%5C%5CGitHub%5C%5Cdahlbyk%5C%5Cposh-git%5C%5Csrc%5C%5CPoshGitTypes.ps1%22%2C%22ref%22%3A%22~%22%7D"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably do the proper clean up here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like after you expand-archive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!