Skip to content

Commit

Permalink
fix(freecad): update release name regex
Browse files Browse the repository at this point in the history
Match new names with v1:
FreeCAD_1.0.0-conda-Windows-x86_64-installer-1.exe
FreeCAD_1.0.0-conda-Windows-x86_64-py311.7z
  • Loading branch information
Rotzbua committed Dec 21, 2024
1 parent 4c62ee4 commit a82df03
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions automatic/freecad/update_helper.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ param(
}
'portable' {
$download_page = (Get-GitHubRelease -Owner "Freecad" -Name "Freecad" -Verbose).assets
$mobile = "portable"
$ext = "7z"
$re64 = "(FreeCAD\-)((\d+)?(\.))+?(\d)?(\-)(Windows)(\-)?(x\d{2})(\-|.)?(\d+)?(\.${ext})$"
$re64 = "(FreeCAD_)?((\d+)?(\.))+?(\d)?(\-conda)?(\-Windows)(\-|.)?(x\d{2}_\d{2}\-)?(py\d{2,5})?(\.${ext})$"
# $url64 = ( $download_page.Links | ? href -match $re64 | Sort-Object -Property 'href' -Descending | Select-Object -First 1 -ExpandProperty 'href' )
$url64 = ( $download_page | Where-Object Name -match $re64 | Select-Object -First 1 -ExpandProperty 'browser_download_url' )
$vert = "$version"
Expand All @@ -44,9 +43,8 @@ param(
}
'stable' {
$download_page = (Get-GitHubRelease -Owner "Freecad" -Name "Freecad" -Verbose).assets
$mobile = "installer"
$ext = "exe"
$re64 = "(FreeCAD\-)((\d+)?(\.))+?(\d)?(\-)(WIN)(\-)?(x\d{2})\-(${mobile})(\-|.)?(\d+)?(\.${ext})$"
$re64 = "(FreeCAD_)?((\d+)?(\.))+?(\d)?(\-conda)?(\-Windows)(\-|.)?(x\d{2}_\d{2}\-)?(installer)?(\-|.)?(\d+)?(\.${ext})$"
# $url64 = ( $download_page.Links | ? href -match $re64 | Sort-Object -Property 'href' -Descending | Select-Object -First 1 -ExpandProperty 'href' )
$url64 = ( $download_page | Where-Object Name -match $re64 | Select-Object -First 1 -ExpandProperty 'browser_download_url' )
$vert = "$version"
Expand Down

0 comments on commit a82df03

Please sign in to comment.