Skip to content

Commit

Permalink
Update Paint.NET manifest and script to use new API endpoint and stru…
Browse files Browse the repository at this point in the history
…cture #783
  • Loading branch information
aaronparker committed Dec 12, 2024
1 parent a5f688d commit 52d8433
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions Evergreen/Apps/Get-PaintDotNet.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@ function Get-PaintDotNet {
)

# Read the Paint.NET updates feed
$Content = Invoke-EvergreenWebRequest -Uri $res.Get.Uri
$Content = Invoke-EvergreenRestMethod -Uri $res.Get.Uri
if ($null -ne $Content) {

# Convert the content from string data
$Data = $Content | ConvertFrom-StringData
$Key = $Data.Keys | Where-Object { $_ -match $res.Get.UrlProperty }

# Build the output object
foreach ($url in $Data.$Key) {
foreach ($File in $Content.releases.files) {
$PSObject = [PSCustomObject] @{
Version = $Data.($res.Get.VersionProperty)
URI = $url
Version = $Content.releases.version
Architecture = Get-Architecture -String $File.architecture
URI = $File.'mirror-urls'[0]
}
Write-Output -InputObject $PSObject
}
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Manifests/PaintDotNet.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Name": "dotPDN LLC Paint.NET",
"Source": "https://getpaint.net",
"Get": {
"Uri": "https://www.getpaint.net/updates/versions.8.1000.0.x64.en.txt",
"Uri": "https://getpaint.net/updates/v9/manifest.os1000.x64.json",
"VersionProperty": "StableVersions",
"UrlProperty": "_ZipUrlList",
"UrlDelimiter": ","
Expand Down

0 comments on commit 52d8433

Please sign in to comment.