Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 6 DotnetRuntimeMetadata.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"channel": "7.0.1xx-preview4",
"channel": "7.0.1xx-preview5",
"quality": "daily",
"qualityFallback": "preview",
"packageVersionPattern": "7.0.0-preview.4",
"packageVersionPattern": "7.0.0-preview.5",
"sdkImageVersion": "7.0.100",
"nextChannel": "7.0.1xx",
"nextChannel": "7.0.1xx-preview5",
Copy link
Member

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?

Copy link
Member Author

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.

"azureFeed": "",
"sdkImageOverride": ""
},
Expand Down
13 changes: 9 additions & 4 deletions 13 tools/UpdateDotnetRuntime.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
)
Expand All @@ -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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there supposed to be inconsistency between 7.0.1xx-preview5 and 7.0.100-preview.5?

Copy link
Member Author

Choose a reason for hiding this comment

The 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
}

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -385,8 +392,6 @@ if ($dotnetUpdate.ShouldUpdate) {
}

Update-DevContainer

Update-DotnetRuntimeMetadataChannel -newSdk $latestSdkVersion
}
else {
Write-Verbose -Verbose -Message $dotnetUpdate.Message
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.