Update Create-DraftRelease.ps1

This commit is contained in:
Jaifroid 2024-03-09 13:06:50 +00:00
parent b6e4cfe1a0
commit f0732c87ab

View File

@ -319,7 +319,7 @@ if ($updatewinget) {
if (-Not $flavour -and $release_body -match 'https:[^)]+?\.(?:appx(?!bundle))') {
$package_urls = @($matches[0])
}
if ($release_body -match 'https:[^)]+?\.(?:exe)') {
if ($release_body -match 'https:(?![^)]+Web-Setup)[^)]+?\.(?:exe)') {
$package_urls += $matches[0]
} else {
"`nUnable to find the package URL!"
@ -333,7 +333,7 @@ if ($updatewinget) {
} else {
$package_id = 'Kiwix.' + 'KiwixJS'
}
if ($package_url -match '\.appx') {
if ($package_url -match '\.appx$') {
$winget_version = $numeric_tag + '.0'
$UrlsWithOverride = '"' + "$package_url|X64" + '"'
}