forked from aaronparker/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet-NotepadPlusPlus.ps1
32 lines (29 loc) · 1.04 KB
/
Get-NotepadPlusPlus.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
28
29
30
31
32
Function Get-NotepadPlusPlus {
<#
.SYNOPSIS
Returns the latest Notepad++ version and download URI.
.NOTES
Author: Bronson Magnan
Twitter: @cit_bronson
#>
[OutputType([System.Management.Automation.PSObject])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "")]
[CmdletBinding(SupportsShouldProcess = $False)]
param (
[Parameter(Mandatory = $False, Position = 0)]
[ValidateNotNull()]
[System.Management.Automation.PSObject]
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]),
[Parameter(Mandatory = $False, Position = 1)]
[ValidateNotNull()]
[System.String] $Filter
)
# 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
}