Skip to content

Commit

Permalink
(umlet) Fix URL to detect install archive
Browse files Browse the repository at this point in the history
This commit updates the automatic update to fix the URL
used when parsing the URL to use for the embedded archive, as
well as the version.

Additionally, it changes the release notes to be automatically updated
so we won't have to update it multiple places in the future when it is needed.

ref #2187
  • Loading branch information
AdmiringWorm committed Mar 27, 2023
1 parent 0169504 commit 6fd256d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions automatic/umlet/update.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Import-Module AU
Import-Module AU

function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix }

Expand All @@ -15,17 +15,23 @@ function global:au_SearchReplace {
}
}

function global:au_AfterUpdate {
Update-Metadata -key 'releaseNotes' -value $Latest.ReleaseNotes
}

function global:au_GetLatest {
$page = Invoke-WebRequest 'https://www.umlet.com/changes.htm' -UseBasicParsing
$changesUrl = 'https://umlet.com/changes'
$page = Invoke-WebRequest $changesUrl -UseBasicParsing
$url = $page.Links `
| Where-Object href -Match 'umlet-standalone-(.+)\.zip$' `
| Select-Object -First 1 -Expand href `
| ForEach-Object {"https://www.umlet.com/$_"}
| Where-Object href -Match 'umlet-standalone-(.+)\.zip$' `
| Select-Object -First 1 -Expand href `
| ForEach-Object { "https://www.umlet.com/$_" }
$version = $matches[1]

@{
Version = $version
URL32 = $url
Version = $version
URL32 = $url
ReleaseNotes = $changesUrl
}
}

Expand Down

0 comments on commit 6fd256d

Please sign in to comment.