-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update script to pin to .NET 7 preview 5 version #17448
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 all commits
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 |
|---|---|---|
|
|
@@ -227,6 +227,7 @@ function Get-DotnetUpdate { | |
| } else { | ||
| $shouldUpdate = $false | ||
| $newVersion = $latestSDKVersionString | ||
|
|
||
| $Message = $null -eq $currentVersion.PreReleaseLabel ? "$latestSDKversion is not preview, update manually." : "No update needed." | ||
| } | ||
| } catch { | ||
|
|
@@ -257,7 +258,7 @@ function Update-DevContainer { | |
| <# | ||
| .DESCRIPTION Update the DotnetMetadata.json file with the latest version of the SDK | ||
| #> | ||
| function Update-DotnetRuntimeMetadataChannel { | ||
| function Update-DotnetRuntimeMetadata { | ||
| param ( | ||
| [string] $newSdk | ||
| ) | ||
|
|
@@ -267,11 +268,15 @@ function Update-DotnetRuntimeMetadataChannel { | |
|
|
||
| # Transform SDK Version '7.0.100-preview.5.22263.22' -> '7.0.1xx-preview5' | ||
| $newChannel = $sdkParts[0] + "." + $sdkParts[1] + "." + ($sdkParts[2] -replace '0','x') + $sdkParts[3] | ||
|
|
||
| Write-Verbose -Verbose -Message "Updating DotnetRuntimeMetadata.json with channel $newChannel" | ||
|
|
||
| # Transform SDK Version '7.0.100-preview.5.22263.22' -> '7.0.100-preview.5' | ||
|
Collaborator
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. is there supposed to be inconsistency between
Member
Author
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. Yes. the one with xx is for the SDK and the other is for nuget packages. |
||
| $newPackageVersionPattern = $sdkParts[0] + "." + $sdkParts[1] + "." + '0-' + ($sdkParts[2] -split '-')[-1] + "." + $sdkParts[3] | ||
| Write-Verbose -Verbose -Message "Updating DotnetRuntimeMetadata.json with package filter $newPackageVersionPattern" | ||
|
|
||
| $metadata = Get-Content -Raw "$PSScriptRoot/../DotnetRuntimeMetadata.json" | ConvertFrom-Json | ||
| $metadata.sdk.channel = $newChannel | ||
| $metadata.sdk.packageVersionPattern = $newPackageVersionPattern | ||
| $metadata | ConvertTo-Json | Out-File -FilePath "$PSScriptRoot/../DotnetRuntimeMetadata.json" -Force | ||
| } | ||
|
|
||
|
|
@@ -355,6 +360,8 @@ if ($dotnetUpdate.ShouldUpdate) { | |
|
|
||
| Write-Verbose -Message "Updating global.json completed." -Verbose | ||
|
|
||
| Update-DotnetRuntimeMetadata -newSdk $latestSdkVersion | ||
|
|
||
| Update-PackageVersion | ||
|
|
||
| Write-Verbose -Message "Updating project files completed." -Verbose | ||
|
|
@@ -385,8 +392,6 @@ if ($dotnetUpdate.ShouldUpdate) { | |
| } | ||
|
|
||
| Update-DevContainer | ||
|
|
||
| Update-DotnetRuntimeMetadataChannel -newSdk $latestSdkVersion | ||
| } | ||
| else { | ||
| Write-Verbose -Verbose -Message $dotnetUpdate.Message | ||
|
|
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.
I guess we will need to update this file when done with a preview release, right?
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.
Yup, unfortunately the auto update will get the next version. currently that will be preview 6. So, we have to pin to a version we want.