forked from aaronparker/evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGet-WinMerge.ps1
29 lines (27 loc) · 1000 Bytes
/
Get-WinMerge.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
Function Get-WinMerge {
<#
.SYNOPSIS
Get the current version and download URL for WinMerge.
.NOTES
Site: https://stealthpuppy.com
Author: Aaron Parker
Twitter: @stealthpuppy
#>
[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])
)
# Get latest version and download latest release via SourceForge API
# Convert the returned release data into a useable object with Version, URI etc.
$params = @{
Uri = $res.Get.Update.Uri
Download = $res.Get.Download
MatchVersion = $res.Get.MatchVersion
}
$object = Get-SourceForgeRepoRelease @params
Write-Output -InputObject $object
}