From e5b919585b040fa04471ce09d20045945e045440 Mon Sep 17 00:00:00 2001 From: Alex Lopez <12056704+virtualex-itv@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:23:05 -0400 Subject: [PATCH] fix(groupy): version detection --- automatic/groupy/update.ps1 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/automatic/groupy/update.ps1 b/automatic/groupy/update.ps1 index 9021cea..00ef7e5 100644 --- a/automatic/groupy/update.ps1 +++ b/automatic/groupy/update.ps1 @@ -8,8 +8,21 @@ function global:au_GetLatest { $Url = 'https://cdn.stardock.us/downloads/public/software/groupy/Groupy2_setup.exe' - $re = "Groupy (?[\d\.]+[\d\.]+)" - $version = $releases -match $re | ForEach-Object { $Matches.version } + $re = "Groupy\s(?\d+(\.\d+)+)\s*(?Beta)?" + $version = $releases.Content -match $re | ForEach-Object { + $versionNumber = $Matches.version + + if ($versionNumber -notlike "*.*.*") { + $versionNumber += ".0" + } + + if ($Matches.beta) { + $versionNumber + "-beta" + } else { + $versionNumber + } + } + $ChecksumType = 'sha256' @{