Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(winscp*) Fixing URL parsing for download #2461

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions automatic/winscp.install/update.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Import-Module Chocolatey-AU

$releases = 'https://winscp.net/eng/downloads.php'
$re = 'WinSCP.+\.exe$'
$re = 'WinSCP.+\.exe/download$'

function global:au_SearchReplace {
@{
Expand All @@ -24,7 +24,7 @@ function global:au_GetLatest {
$url = @($download_page.links | Where-Object href -match $re) -notmatch 'beta|rc' | ForEach-Object href
$url = 'https://winscp.net/eng' + $url
$version = $url -split '-' | Select-Object -Last 1 -Skip 1
$file_name = $url -split '/' | Select-Object -last 1
$file_name = $url -split '/' | Select-Object -last 1 -Skip 1
@{
Version = $version
URL32 = "https://sourceforge.net/projects/winscp/files/WinSCP/$version/$file_name/download"
Expand Down
4 changes: 2 additions & 2 deletions automatic/winscp.portable/update.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Import-Module Chocolatey-AU

$releases = 'https://winscp.net/eng/downloads.php'
$re = 'WinSCP.+Portable\.zip$'
$re = 'WinSCP.+Portable\.zip/download$'

function global:au_SearchReplace {
@{
Expand Down Expand Up @@ -33,7 +33,7 @@ function global:au_GetLatest {
$url = @($download_page.links | Where-Object href -match $re) -notmatch 'beta|rc' | ForEach-Object href
$url = 'https://winscp.net/eng' + $url
$version = $url -split '-' | Select-Object -Last 1 -Skip 1
$file_name = $url -split '/' | Select-Object -last 1
$file_name = $url -split '/' | Select-Object -last 1 -Skip 1
@{
Version = $version
URL32 = "https://sourceforge.net/projects/winscp/files/WinSCP/$version/$file_name/download"
Expand Down