Skip to content

Commit

Permalink
Update URL pattern to restrict matches to specific file types
Browse files Browse the repository at this point in the history
  • Loading branch information
Utesgui committed Dec 13, 2024
1 parent cf956e5 commit 7ad4069
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Function Get-VersionAndUrl {
$lines = $Latest -split "`n" -split " "

$versionPattern = '^\d+(?:\.\d+)*(-(?:alpha|beta)\.?\d+)?$'
$urlPattern = '^http[s]?:\/\/[^\s]+$'
$urlPattern = '^http[s]?:\/\/[^\s]+(\.msi|\.exe|\.appx|\.zip)$'

$version = $lines | Where-Object { $_ -match $versionPattern }
$URLs = $lines | Where-Object { $_ -match $urlPattern }
Expand Down

0 comments on commit 7ad4069

Please sign in to comment.