From 61b40bc686d13ee744ecbfe21ef16c0028041ea0 Mon Sep 17 00:00:00 2001 From: Alex Harvey Date: Wed, 18 Sep 2024 22:10:12 +1000 Subject: [PATCH] [#740] Add WinFSP --- Evergreen/Apps/Get-NavimaticsWinFSP.ps1 | 28 +++++++++++++++++++++++ Evergreen/Manifests/NavimaticsWinFSP.json | 20 ++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Evergreen/Apps/Get-NavimaticsWinFSP.ps1 create mode 100644 Evergreen/Manifests/NavimaticsWinFSP.json diff --git a/Evergreen/Apps/Get-NavimaticsWinFSP.ps1 b/Evergreen/Apps/Get-NavimaticsWinFSP.ps1 new file mode 100644 index 00000000..fa633279 --- /dev/null +++ b/Evergreen/Apps/Get-NavimaticsWinFSP.ps1 @@ -0,0 +1,28 @@ +Function Get-WinFSP { + <# + .SYNOPSIS + Get the current version and download URL for WinSFP. + + .NOTES + Site: https://winfsp.dev/rel/ + Author: Alex Harvey + GitHub: @alex-harvey-z3q + #> + [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 +} diff --git a/Evergreen/Manifests/NavimaticsWinFSP.json b/Evergreen/Manifests/NavimaticsWinFSP.json new file mode 100644 index 00000000..2365c2a9 --- /dev/null +++ b/Evergreen/Manifests/NavimaticsWinFSP.json @@ -0,0 +1,20 @@ +{ + "Name": "WinFSP", + "Source": "https://winfsp.dev/rel/", + "Get": { + "Uri": "https://api.github.com/repos/winfsp/winfsp/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.msi$" + }, + "Install": { + "Setup": "winfsp-*.msi", + "Physical": { + "Arguments": "", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +}