-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #606 from jms-du-se/main
New apps: eduVPN and Clarivate Endnote
- Loading branch information
Showing
4 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
function Get-ClarivateEndNote { | ||
<# | ||
.SYNOPSIS | ||
Get the current version and download URIs for the supported releases of Endnote. | ||
.NOTES | ||
Author: Jasper Metselaar | ||
E-mail: [email protected] | ||
#> | ||
[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]) | ||
) | ||
|
||
foreach ($Release in $res.Get.Update.Releases) { | ||
Write-Verbose -Message "$($MyInvocation.MyCommand): Release: $Release" | ||
Write-Verbose -Message "$($MyInvocation.MyCommand): Endnote Update URL: $($res.Get.Update.Uri.$Release)" | ||
Write-Verbose -Message "$($MyInvocation.MyCommand): Download URL: $($res.Get.Download.Uri.$Release)" | ||
|
||
# Query the EndNote update API | ||
$UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri.($Release) | ||
if ($null -ne $UpdateFeed) { | ||
|
||
# Sort the updates to find the latest | ||
$Update = $UpdateFeed.updates.build | ` | ||
Sort-Object -Property @{ Expression = { [System.Version]$_.version }; Descending = $true } -ErrorAction "SilentlyContinue" | ` | ||
Select-Object -First 1 | ||
|
||
# Construct the output for the .exe installer; Return the custom object to the pipeline | ||
$PSObject = [PSCustomObject] @{ | ||
Version = $Update.UpdateTo | ||
Release = $Release | ||
Type = Get-FileType -File $res.Get.Download.Uri.Exe.($Release) | ||
URI = $res.Get.Download.Uri.Exe.($Release) | ||
} | ||
Write-Output -InputObject $PSObject | ||
|
||
# Construct the output for the .msi installer; Return the custom object to the pipeline | ||
$PSObject = [PSCustomObject] @{ | ||
Version = $Update.UpdateTo | ||
Release = $Release | ||
Type = Get-FileType -File $res.Get.Download.Uri.Msi.($Release) | ||
URI = $res.Get.Download.Uri.Msi.($Release) | ||
} | ||
Write-Output -InputObject $PSObject | ||
|
||
# Construct the output for the MSP patch; Return the custom object to the pipeline | ||
$PSObject = [PSCustomObject] @{ | ||
Version = $Update.updateTo | ||
Release = $Release | ||
Type = Get-FileType -File $Update.url | ||
URI = $Update.url | ||
} | ||
Write-Output -InputObject $PSObject | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Function Get-eduVPN { | ||
<# | ||
.SYNOPSIS | ||
Returns the latest EduVPN version number and download. | ||
.NOTES | ||
Author: Jasper Metselaar | ||
E-mail: [email protected] | ||
#> | ||
[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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"Name": "Clarivate EndNote", | ||
"Source": "https://www.endnote.com/", | ||
"Get": { | ||
"Update": { | ||
"Releases": [ | ||
"X9", | ||
"20", | ||
"21" | ||
], | ||
"Uri": { | ||
"X9": "http://download.endnote.com/updates/19.0/EN19WinUpdates.xml", | ||
"20": "https://download.endnote.com/updates/20.0/EN20WinUpdates.xml", | ||
"21": "https://download.endnote.com/updates/21.0/EN21WinUpdates.xml" | ||
} | ||
}, | ||
"Download": { | ||
"Uri": { | ||
"Exe": { | ||
"X9": "https://download.endnote.com/downloads/X9/ENX9Inst.exe", | ||
"20": "https://download.endnote.com/downloads/20/EN20Inst.exe", | ||
"21": "https://download.endnote.com/downloads/21/EN21Inst.exe" | ||
}, | ||
"Msi": { | ||
"X9": "https://download.endnote.com/downloads/X9/ENX9Inst.msi", | ||
"20": "https://download.endnote.com/downloads/20/EN20Inst.msi", | ||
"21": "https://download.endnote.com/downloads/21/EN21Inst.msi" | ||
} | ||
} | ||
} | ||
}, | ||
"Install": { | ||
"Setup": "", | ||
"Physical": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
}, | ||
"Virtual": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"Name": "eduVPN", | ||
"Source": "https://app.eduvpn.org/", | ||
"Get": { | ||
"Uri": "https://api.github.com/repos/Amebis/eduVPN/releases/latest", | ||
"MatchVersion": "(\\d+(\\.\\d+){1,4}).*", | ||
"MatchFileTypes": "eduVPNClient_.*(exe|msi)$" | ||
}, | ||
"Install": { | ||
"Setup": "eduVPNClient_*.exe", | ||
"Preinstall": "", | ||
"Physical": { | ||
"Arguments": "/install /quiet /norestart", | ||
"PostInstall": [ | ||
] | ||
}, | ||
"Virtual": { | ||
"Arguments": "", | ||
"PostInstall": [ | ||
] | ||
} | ||
} | ||
} |