Skip to content

Commit

Permalink
Merge pull request #2479 from suprovsky/master
Browse files Browse the repository at this point in the history
`(mumble)` Outdated, fix getting auto updates and add a required dependency
  • Loading branch information
TheCakeIsNaOH authored Jun 11, 2024
2 parents 05b11cc + b6c3134 commit e47802c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
1 change: 1 addition & 0 deletions automatic/mumble/mumble.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Example `choco install mumble --package-parameters="/IncludeAll"`
<bugTrackerUrl>https://github.com/mumble-voip/mumble/issues</bugTrackerUrl>
<dependencies>
<dependency id="chocolatey-core.extension" version="1.3.3" />
<dependency id="vcredist140" />
</dependencies>
</metadata>
<files>
Expand Down
21 changes: 7 additions & 14 deletions automatic/mumble/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,21 @@ function global:au_SearchReplace {
}

function global:au_AfterUpdate {
Update-metadata -key "releaseNotes" -value $Latest.ReleaseNotes
Update-Metadata -key "releaseNotes" -value $Latest.ReleaseNotes
}

function global:au_GetLatest {
$LatestRelease = Get-GitHubRelease mumble-voip mumble
$download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing

$re = '\.msi$'
$url32 = $download_page.Links | ? href -match $re | select -first 1 -expand href | % { 'https://github.com' + $_ }

$verRe = '\/'
$version32 = $url32 -split "$verRe" | select -last 1 -skip 1

$releaseNotes = $download_page.Links | ? href -match "mumble.info\/blog" | select -first 1 -expand href

$url32 = $LatestRelease.assets | Where-Object {$_.name.StartsWith("mumble_client")} | Where-Object {$_.name.EndsWith(".msi")} | Select-Object -ExpandProperty browser_download_url
$releaseNotes = $download_page.Links | ? href -match "www.mumble.info\/blog" | Select-Object -first 1 -expand href
if (!$releaseNotes) {
$releaseNotes = "$releases/tag/$version32"
$releaseNotes = "$LatestRelease.body"
}

@{
URL32 = $url32
Version = Get-Version $version32
ReleasesUrl = "$releases/tag/$version32"
Version = $LatestRelease.tag_name.TrimStart("v") # Tags have a "v" prefix
ReleasesUrl = $LatestRelease.html_url
ReleaseNotes = $releaseNotes
}
}
Expand Down

0 comments on commit e47802c

Please sign in to comment.