Skip to content

Commit

Permalink
Merge pull request #631 from aaronparker/new-apps
Browse files Browse the repository at this point in the history
New apps
  • Loading branch information
aaronparker authored Feb 18, 2024
2 parents 213b878 + 6b06c01 commit 47cbde0
Show file tree
Hide file tree
Showing 21 changed files with 548 additions and 1 deletion.
44 changes: 44 additions & 0 deletions Evergreen/Apps/Get-AdobeDigitalEditions.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Function Get-AdobeDigitalEditions {
<#
.SYNOPSIS
Gets the version and download URLs for Adobe Digital Editions.
.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])
)

$params = @{
Uri = $res.Get.Update.Uri
}
$updateFeed = Invoke-EvergreenRestMethod @params

# Removing first 3 bytes from array by selecting the full length and stripping first 3
Write-Verbose "Remove-ByteOrderMark (UTF8 BOM)"
$OutputBytes = $updateFeed[3..$updateFeed.Length]
$updateFeed = [System.Text.Encoding]::UTF8.GetString($OutputBytes) | ConvertFrom-Json

if ($Null -ne $updateFeed) {

# Output the object to the pipeline
foreach ($item in $updateFeed) {
$PSObject = [PSCustomObject] @{
Version = $item.version
URI = $item.SecuredDownloadPath
}
Write-Output -InputObject $PSObject
}

}
else {
Write-Error -Message "$($MyInvocation.MyCommand): unable to retrieve content from $($res.Get.Update.Uri)."
}
}
61 changes: 61 additions & 0 deletions Evergreen/Apps/Get-ClarivateEndnote.ps1
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
}
}
}
28 changes: 28 additions & 0 deletions Evergreen/Apps/Get-DBBrowserforSQLite.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Function Get-DBBrowserforSQLite {
<#
.SYNOPSIS
Returns the available DB Browser for SQLite versions.
.NOTES
Author: Jasper Metselaar
E-mail: [email protected]
#>
[OutputType([System.Management.Automation.PSObject])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification="Product name is a plural")]
[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
}
28 changes: 28 additions & 0 deletions Evergreen/Apps/Get-Eduvpn.ps1
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
}
33 changes: 33 additions & 0 deletions Evergreen/Apps/Get-JabraDirect.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Function Get-JabraDirect {
<#
.SYNOPSIS
Returns the latest Jabra Direct version.
.NOTES
Author: Jasper Metselaar
E-mail: [email protected]
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification = "Product name is a plural")]
[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])
)

$Content = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri
If ($Null -ne $Content) {

$PSObject = [PSCustomObject] @{
Version = $Content.WindowsVersion
Architecture = "x64"
ReleaseNotes = $Content.WindowsReleaseNotes
Type = Get-FileType -File $Content.WindowsDownload
Sha256 = $Content.WindowsSHA256
URI = $Content.WindowsDownload
}
Write-Output -InputObject $PSObject
}
}
26 changes: 26 additions & 0 deletions Evergreen/Apps/Get-MicrosoftWSL.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Function Get-MicrosoftWSL {
<#
.SYNOPSIS
Returns the available Microsoft WSL versions.
.NOTES
Author: Kirill Trofimov
#>
[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
}
41 changes: 41 additions & 0 deletions Evergreen/Apps/Get-Npcap.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Function Get-Npcap {
<#
.SYNOPSIS
Returns the latest Npcap 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])
)


# Get latest version and download latest release via GitHub API
$params = @{
Uri = $res.Get.Update.Uri
ContentType = $res.Get.Update.ContentType
ReturnObject = "Content"
}

# Get only latest version tag from GitHub API
$Content = ((Invoke-EvergreenWebRequest @params | ConvertFrom-Json).name -replace "v",""| ForEach-Object { New-Object -TypeName "System.Version" ($_) } | Sort-Object -Descending | Select-Object -First 1 | ForEach-Object {("{0}.{1}" -f $_.Major,$_.Minor)})

if ($null -ne $Content) {
$Content | ForEach-Object {
$PSObject = [PSCustomObject] @{
Version = $_
Type = "exe"
URI = $res.Get.Download.Uri -replace $res.Get.Download.ReplaceText, $_
}
Write-Output -InputObject $PSObject
}
}
}

27 changes: 27 additions & 0 deletions Evergreen/Apps/Get-Podman.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Function Get-Podman {
<#
.SYNOPSIS
Returns the available Podman versions.
.NOTES
Author: Kirill Trofimov
#>
[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
}
34 changes: 34 additions & 0 deletions Evergreen/Apps/Get-PodmanDesktop.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Function Get-PodmanDesktop {
<#
.SYNOPSIS
Returns the available Podman Desktop versions.
.NOTES
Author: Kirill Trofimov
#>
[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

# For windows there are two different .exe versions.
foreach ($o in $object) {
if (-not($o.URI.contains("setup")) -and $o.URI.EndsWith(".exe")) {
$o.InstallerType = "Portable"
}
}

Write-Output -InputObject $object
}
21 changes: 21 additions & 0 deletions Evergreen/Manifests/AdobeDigitalEditions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"Name": "Adobe Digital Editions",
"Source": "https://www.adobe.com/solutions/ebook/digital-editions.html",
"Get": {
"Update": {
"Uri": "https://adedownload.adobe.com/pub/adobe/digitaleditions/sha2/adeupdaterconfig.cfg"
}
},
"Install": {
"Preinstall": "",
"Setup": "ADE_*_Installer.exe",
"Physical": {
"Arguments": "/S",
"PostInstall": []
},
"Virtual": {
"Arguments": "",
"PostInstall": []
}
}
}
Loading

0 comments on commit 47cbde0

Please sign in to comment.