Skip to content

Commit

Permalink
Merge pull request #2446 from WhereTheTimeWent/patch-1
Browse files Browse the repository at this point in the history
(tortoisesvn) Fix finding download URL from SourceForge
  • Loading branch information
JPRuskin authored Oct 15, 2024
2 parents 7ea9f0f + 2548a1a commit 16bf649
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ install:
'chocolatey' = $chocoVersion
'wormies-au-helpers' = '0.4.1'
'chocolatey-core.extension' = '1.4.0'
'autohotkey.install' = '1.1.35.00'
'chocolatey-community-validation.extension' = '0.1.0'
}.GetEnumerator() | % {
if (!(Test-Path "${env:nupkg_cache_path}\$($_.Key).$($_.Value).nupkg")) { rm "${env:nupkg_cache_path}\$($_.Key).*.nupkg" ; Invoke-WebRequest "https://chocolatey.org/api/v2/package/$($_.Key)/$($_.Value)" -OutFile "${env:nupkg_cache_path}\$($_.Key).$($_.Value).nupkg" }
Expand Down
12 changes: 6 additions & 6 deletions automatic/tortoisesvn/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ function global:au_SearchReplace {
}
}

function Get-ActualUrl([uri]$url) {
$download_page = Invoke-WebRequest -UseBasicParsing -Uri $url

$path = $download_page.links | ? href -match 'redir.*\.msi$' | select -first 1 -expand href

return $url.Scheme + "://" + $url.Host + $path
function Get-ActualUrl([string]$url) {
if (!$url.EndsWith("/")) {
$url += "/"
}
return $url + "download"
}

function global:au_GetLatest {
Expand All @@ -51,6 +50,7 @@ function global:au_GetLatest {
URL32 = Get-ActualUrl $url32
URL64 = Get-ActualUrl $url64
Version = $version32
FileType = "msi"
}
return $result
}
Expand Down

0 comments on commit 16bf649

Please sign in to comment.