Skip to content
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
18 changes: 17 additions & 1 deletion lib/services/windows_desktop_update_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ class WindowsDesktopUpdateController extends ChangeNotifier {
);

if (versionResponse == null) {
_reportInfoSafely(
'No desktop update detected.',
source: 'WindowsDesktopUpdateController.checkVersion',
error: <String, Object?>{
'appArchiveUrl': _appArchiveUrl.toString(),
},
);
return;
Comment on lines +97 to 104
}

Expand All @@ -119,7 +126,16 @@ class WindowsDesktopUpdateController extends ChangeNotifier {
},
);
notifyListeners();
} catch (_) {
} catch (error, stackTrace) {
_reportInfoSafely(
'Desktop update check failed.',
source: 'WindowsDesktopUpdateController.checkVersion',
error: <String, Object?>{
'appArchiveUrl': _appArchiveUrl.toString(),
'error': error.toString(),
'stackTrace': stackTrace.toString(),
},
);
// Leave the direct installer updater silent if the remote metadata fails.
}
}
Expand Down
2 changes: 1 addition & 1 deletion release/metadata/4.3.3+87.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"type": "improvement"
},
{
"message": "Online is coming soon\u2122.",
"message": "Online is coming soon.",
"type": "other"
}
]
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_desktop_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if (-not (Test-Path $metadataPath)) {
)
}

$metadata | ConvertTo-Json -Depth 6 | Set-Content -Path $metadataPath
Write-JsonFileUtf8 -Value $metadata -Path $metadataPath -Depth 6
Write-Host "Created release metadata at $metadataPath"
}
else {
Expand All @@ -73,7 +73,7 @@ else {

if ($missingChannels.Count -gt 0) {
$metadata.channels = @($channels + $missingChannels)
$metadata | ConvertTo-Json -Depth 6 | Set-Content -Path $metadataPath
Write-JsonFileUtf8 -Value $metadata -Path $metadataPath -Depth 6
Write-Host ("Updated release metadata channels at {0}: {1}" -f $metadataPath, ($metadata.channels -join ", "))
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_store_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ $packageInfo = [ordered]@{
sourcePath = $primaryPackage.FullName
}

$packageInfo | ConvertTo-Json -Depth 4 | Set-Content -Path (Join-Path $outputRoot "package-info.json")
Write-JsonFileUtf8 -Value $packageInfo -Path (Join-Path $outputRoot "package-info.json") -Depth 4

Write-Host "Store package staged at $stagedPackagePath" -ForegroundColor Green
19 changes: 19 additions & 0 deletions scripts/common_release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,22 @@ function Invoke-RepoCommand {
Pop-Location
}
}

function Write-JsonFileUtf8 {
param(
[Parameter(Mandatory = $true)]
[object]$Value,
[Parameter(Mandatory = $true)]
[string]$Path,
[Parameter()]
[int]$Depth = 8
)

$json = $Value | ConvertTo-Json -Depth $Depth
$utf8NoBom = New-Object System.Text.UTF8Encoding($false)
[System.IO.File]::WriteAllText(
[System.IO.Path]::GetFullPath($Path),
$json + [System.Environment]::NewLine,
$utf8NoBom
)
}
2 changes: 1 addition & 1 deletion scripts/generate_update_manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ $manifest = [ordered]@{
items = @($sortedItems)
}

$manifest | ConvertTo-Json -Depth 8 | Set-Content -Path $OutputPath
Write-JsonFileUtf8 -Value $manifest -Path $OutputPath -Depth 8
Write-Host "Generated desktop updater manifest at $OutputPath" -ForegroundColor Green
Loading