|
5 | 5 | # On Windows paths is separated by semicolon |
6 | 6 | $script:TestModulePathSeparator = [System.IO.Path]::PathSeparator |
7 | 7 |
|
8 | | -$dotnetCLIChannel = "release" |
| 8 | +$dotnetCLIChannel = 'preview' # TODO: Change this to 'release' once .Net Core 3.0 goes RTM |
9 | 9 | $dotnetCLIRequiredVersion = $(Get-Content $PSScriptRoot/global.json | ConvertFrom-Json).Sdk.Version |
10 | 10 |
|
11 | 11 | # Track if tags have been sync'ed |
@@ -410,7 +410,7 @@ Fix steps: |
410 | 410 | Pop-Location |
411 | 411 | } |
412 | 412 |
|
413 | | - # publish netcoreapp2.1 reference assemblies |
| 413 | + # publish reference assemblies |
414 | 414 | try { |
415 | 415 | Push-Location "$PSScriptRoot/src/TypeCatalogGen" |
416 | 416 | $refAssemblies = Get-Content -Path $incFileName | Where-Object { $_ -like "*microsoft.netcore.app*" } | ForEach-Object { $_.TrimEnd(';') } |
@@ -449,51 +449,6 @@ Fix steps: |
449 | 449 | } |
450 | 450 | } |
451 | 451 |
|
452 | | - if ($Environment.IsWindows) { |
453 | | - ## need RCEdit to modify the binaries embedded resources |
454 | | - $rcedit = "~/.rcedit/rcedit-x64.exe" |
455 | | - if (-not (Test-Path -Type Leaf $rcedit)) { |
456 | | - $rcedit = Get-Command "rcedit-x64.exe" -CommandType Application -ErrorAction Ignore | Select-Object -First 1 | ForEach-Object Name |
457 | | - } |
458 | | - if (-not $rcedit) { |
459 | | - throw "RCEdit is required to modify pwsh.exe resources, please run 'Start-PSBootStrap' to install" |
460 | | - } |
461 | | - |
462 | | - $ReleaseVersion = "" |
463 | | - if ($ReleaseTagToUse) { |
464 | | - $ReleaseVersion = $ReleaseTagToUse |
465 | | - } else { |
466 | | - $ReleaseVersion = (Get-PSCommitId -WarningAction SilentlyContinue) -replace '^v' |
467 | | - } |
468 | | - # in VSCode, depending on where you started it from, the git commit id may be empty so provide a default value |
469 | | - if (!$ReleaseVersion) { |
470 | | - $ReleaseVersion = "6.0.0" |
471 | | - $fileVersion = "6.0.0" |
472 | | - } else { |
473 | | - $fileVersion = $ReleaseVersion.Split("-")[0] |
474 | | - } |
475 | | - |
476 | | - # in VSCode, the build output folder doesn't include the name of the exe so we have to add it for rcedit |
477 | | - $pwshPath = $Options.Output |
478 | | - if (!$pwshPath.EndsWith("pwsh.exe")) { |
479 | | - $pwshPath = Join-Path $Options.Output "pwsh.exe" |
480 | | - } |
481 | | - |
482 | | - if (Test-IsPreview $ReleaseVersion) { |
483 | | - $iconPath = "$PSScriptRoot\assets\Powershell_av_colors.ico" |
484 | | - } else { |
485 | | - $iconPath = "$PSScriptRoot\assets\Powershell_black.ico" |
486 | | - } |
487 | | - |
488 | | - # fxdependent package does not have an executable to set iconPath etc. |
489 | | - if ($Options.Runtime -ne 'fxdependent') { |
490 | | - Start-NativeExecution { & $rcedit $pwshPath --set-icon $iconPath ` |
491 | | - --set-file-version $fileVersion --set-product-version $ReleaseVersion --set-version-string "ProductName" "PowerShell 7" ` |
492 | | - --set-version-string "LegalCopyright" "(C) Microsoft Corporation. All Rights Reserved." ` |
493 | | - --application-manifest "$PSScriptRoot\assets\pwsh.manifest" } | Write-Verbose |
494 | | - } |
495 | | - } |
496 | | - |
497 | 452 | # download modules from powershell gallery. |
498 | 453 | # - PowerShellGet, PackageManagement, Microsoft.PowerShell.Archive |
499 | 454 | if ($PSModuleRestore) { |
@@ -617,8 +572,8 @@ function New-PSOptions { |
617 | 572 | [ValidateSet("Debug", "Release", "CodeCoverage", '')] |
618 | 573 | [string]$Configuration, |
619 | 574 |
|
620 | | - [ValidateSet("netcoreapp2.1")] |
621 | | - [string]$Framework, |
| 575 | + [ValidateSet("netcoreapp3.0")] |
| 576 | + [string]$Framework = "netcoreapp3.0", |
622 | 577 |
|
623 | 578 | # These are duplicated from Start-PSBuild |
624 | 579 | # We do not use ValidateScript since we want tab completion |
@@ -656,6 +611,7 @@ function New-PSOptions { |
656 | 611 | } |
657 | 612 |
|
658 | 613 | Write-Verbose "Using configuration '$Configuration'" |
| 614 | + Write-Verbose "Using framework '$Framework'" |
659 | 615 |
|
660 | 616 | if (-not $Runtime) { |
661 | 617 | if ($Environment.IsLinux) { |
@@ -1741,19 +1697,6 @@ function Start-PSBootstrap { |
1741 | 1697 | $psInstallFile = [System.IO.Path]::Combine($PSScriptRoot, "tools", "install-powershell.ps1") |
1742 | 1698 | & $psInstallFile -AddToPath |
1743 | 1699 | } |
1744 | | - |
1745 | | - ## need RCEdit to modify the binaries embedded resources |
1746 | | - if (-not (Test-Path "~/.rcedit/rcedit-x64.exe")) |
1747 | | - { |
1748 | | - Write-Log "Install RCEdit for modifying exe resources" |
1749 | | - $rceditUrl = "https://github.com/electron/rcedit/releases/download/v1.0.0/rcedit-x64.exe" |
1750 | | - New-Item -Path "~/.rcedit" -Type Directory -Force > $null |
1751 | | - |
1752 | | - ## need to specify TLS version 1.2 since GitHub API requires it |
1753 | | - [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 |
1754 | | - |
1755 | | - Invoke-WebRequest -OutFile "~/.rcedit/rcedit-x64.exe" -Uri $rceditUrl |
1756 | | - } |
1757 | 1700 | } |
1758 | 1701 | } finally { |
1759 | 1702 | Pop-Location |
@@ -1854,12 +1797,13 @@ function Start-TypeGen |
1854 | 1797 | <Target Name="_GetDependencies" |
1855 | 1798 | DependsOnTargets="ResolveAssemblyReferencesDesignTime"> |
1856 | 1799 | <ItemGroup> |
1857 | | - <_RefAssemblyPath Include="%(_ReferencesFromRAR.HintPath)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' "/> |
| 1800 | + <_RefAssemblyPath Include="%(_ReferencesFromRAR.OriginalItemSpec)%3B" Condition=" '%(_ReferencesFromRAR.NuGetPackageId)' != 'Microsoft.Management.Infrastructure' "/> |
1858 | 1801 | </ItemGroup> |
1859 | 1802 | <WriteLinesToFile File="$(_DependencyFile)" Lines="@(_RefAssemblyPath)" Overwrite="true" /> |
1860 | 1803 | </Target> |
1861 | 1804 | </Project> |
1862 | 1805 | '@ |
| 1806 | + New-Item -ItemType Directory -Path (Split-Path -Path $GetDependenciesTargetPath -Parent) -Force > $null |
1863 | 1807 | Set-Content -Path $GetDependenciesTargetPath -Value $GetDependenciesTargetValue -Force -Encoding Ascii |
1864 | 1808 |
|
1865 | 1809 | Push-Location "$PSScriptRoot/src/Microsoft.PowerShell.SDK" |
@@ -2317,7 +2261,7 @@ function Copy-PSGalleryModules |
2317 | 2261 | Remove-Item -Force -ErrorAction Ignore -Recurse "$Destination/$name" |
2318 | 2262 | New-Item -Path $dest -ItemType Directory -Force -ErrorAction Stop > $null |
2319 | 2263 | # Exclude files/folders that are not needed. The fullclr folder is coming from the PackageManagement module |
2320 | | - $dontCopy = '*.nupkg', '*.nupkg.sha512', '*.nuspec', 'System.Runtime.InteropServices.RuntimeInformation.dll', 'fullclr' |
| 2264 | + $dontCopy = '*.nupkg', '*.nupkg.metadata', '*.nupkg.sha512', '*.nuspec', 'System.Runtime.InteropServices.RuntimeInformation.dll', 'fullclr' |
2321 | 2265 | Copy-Item -Exclude $dontCopy -Recurse $src/* $dest |
2322 | 2266 | } |
2323 | 2267 | } |
|
0 commit comments