Skip to content

Commit

Permalink
Add CitrixShareFile
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Oct 9, 2023
1 parent bbf46ea commit e0878d9
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Evergreen/Apps/Get-CitrixShareFile.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
function Get-CitrixShareFile {
<#
.SYNOPSIS
Returns the current Citrix ShareFile for Windows releases.
.NOTES
Author: Tschuegy
Twitter:
#>
[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])
)

# Read the Citrix ShareFile for Windows for updater feed
$params = @{
Uri = $res.Get.Update.Uri
}
$UpdateFeed = Invoke-RestMethodWrapper @params

# Walk through each node to output details
if ($null -ne $UpdateFeed) {

# Select the latest version
$Latest = $UpdateFeed | `
Sort-Object -Property @{ Expression = { [System.Version]$_.Version }; Descending = $true } -ErrorAction "SilentlyContinue" | `
Select-Object -First 1

# Create the output object
$PSObject = [PSCustomObject] @{
Version = $Latest.enclosure.version
Date = ConvertTo-DateTime -DateTime $($Latest.pubDate) -Pattern $($res.Get.Update.DatePattern)
Size = $(if ($Latest.enclosure.length) { $Latest.enclosure.length } else { "Unknown" })
Hash = $Latest.enclosure.dsaSignature
URI = $Latest.enclosure.url
}
Write-Output -InputObject $PSObject
}
}
21 changes: 21 additions & 0 deletions Evergreen/Manifests/CitrixShareFile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"Name": "Citrix ShareFile for Windows",
"Source": "https://www.citrix.com/downloads/sharefile/clients-and-plug-ins/citrix-files-for-windows.html",
"Get": {
"Update": {
"Uri": "http://www.sf-cdn.net/downloads/cfwin/updates.xml",
"DatePattern": "ddd, dd MMM yyyy HH:mm:ss zzzz"
}
},
"Install": {
"Setup": "CitrixFilesForWindows*.exe|ShareFileForWindows*.exe",
"Physical": {
"Arguments": "/install /quiet /norestart",
"PostInstall": []
},
"Virtual": {
"Arguments": "/install /quiet /norestart",
"PostInstall": []
}
}
}

0 comments on commit e0878d9

Please sign in to comment.