forked from aaronparker/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Get-Audacity.ps1
27 lines (25 loc) · 861 Bytes
/
Get-Audacity.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Function Get-Audacity {
<#
.SYNOPSIS
Returns the latest Audacity version number and download.
.NOTES
Author: Dan Gough
Twitter: @packageologist
#>
[OutputType([System.Management.Automation.PSObject])]
[CmdletBinding(SupportsShouldProcess = $False)]
param (
[Parameter(Mandatory = $False, Position = 0)]
[ValidateNotNull()]
[System.Management.Automation.PSObject]
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)
# Pass the repo releases API URL and return a formatted object
$params = @{
Uri = $res.Get.Uri
MatchVersion = $res.Get.MatchVersion
Filter = $res.Get.MatchFileTypes
}
$object = Get-GitHubRepoRelease @params
Write-Output -InputObject $object
}