From 36ab2b97435b6758d4d6c10df94d039e49a59a61 Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Thu, 21 Dec 2023 14:20:35 +0100 Subject: [PATCH 01/13] New apps: eduVPN and Clarivate Endnote --- Evergreen/Apps/Get-ClarivateEndnote.ps1 | 61 +++++++++++++++++++++++ Evergreen/Apps/Get-Eduvpn.ps1 | 28 +++++++++++ Evergreen/Manifests/ClarivateEndnote.json | 43 ++++++++++++++++ Evergreen/Manifests/Eduvpn.json | 23 +++++++++ 4 files changed, 155 insertions(+) create mode 100644 Evergreen/Apps/Get-ClarivateEndnote.ps1 create mode 100644 Evergreen/Apps/Get-Eduvpn.ps1 create mode 100644 Evergreen/Manifests/ClarivateEndnote.json create mode 100644 Evergreen/Manifests/Eduvpn.json diff --git a/Evergreen/Apps/Get-ClarivateEndnote.ps1 b/Evergreen/Apps/Get-ClarivateEndnote.ps1 new file mode 100644 index 00000000..7c3b18f0 --- /dev/null +++ b/Evergreen/Apps/Get-ClarivateEndnote.ps1 @@ -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: jms@du.se + #> + [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 + } + } +} \ No newline at end of file diff --git a/Evergreen/Apps/Get-Eduvpn.ps1 b/Evergreen/Apps/Get-Eduvpn.ps1 new file mode 100644 index 00000000..b2c58daa --- /dev/null +++ b/Evergreen/Apps/Get-Eduvpn.ps1 @@ -0,0 +1,28 @@ +Function Get-eduVPN { + <# + .SYNOPSIS + Returns the latest EduVPN version number and download. + + .NOTES + Author: Jasper Metselaar + E-mail: jms@du.se + #> + [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/ClarivateEndnote.json b/Evergreen/Manifests/ClarivateEndnote.json new file mode 100644 index 00000000..ca4decae --- /dev/null +++ b/Evergreen/Manifests/ClarivateEndnote.json @@ -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": [] + } + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/Eduvpn.json b/Evergreen/Manifests/Eduvpn.json new file mode 100644 index 00000000..9a47bdf4 --- /dev/null +++ b/Evergreen/Manifests/Eduvpn.json @@ -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": [ + ] + } + } +} \ No newline at end of file From 9360f8132259c03964f71689a54b2e48fdb38fcb Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Mon, 8 Jan 2024 16:27:35 +0100 Subject: [PATCH 02/13] New App - Npcap --- Evergreen/Apps/Get-Npcap.ps1 | 41 ++++++++++++++++++++++++++++++++++ Evergreen/Manifests/Npcap.json | 26 +++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 Evergreen/Apps/Get-Npcap.ps1 create mode 100644 Evergreen/Manifests/Npcap.json diff --git a/Evergreen/Apps/Get-Npcap.ps1 b/Evergreen/Apps/Get-Npcap.ps1 new file mode 100644 index 00000000..36e128bc --- /dev/null +++ b/Evergreen/Apps/Get-Npcap.ps1 @@ -0,0 +1,41 @@ +Function Get-Npcap { + <# + .SYNOPSIS + Returns the latest Npcap version number and download. + + .NOTES + Author: Jasper Metselaar + E-mail: jms@du.se + #> + [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 + } + } +} + diff --git a/Evergreen/Manifests/Npcap.json b/Evergreen/Manifests/Npcap.json new file mode 100644 index 00000000..9fc4e0eb --- /dev/null +++ b/Evergreen/Manifests/Npcap.json @@ -0,0 +1,26 @@ +{ + "Name": "Npcap", + "Source": "https://npcap.com/", + "Get": { + "Update": { + "Uri": "https://api.github.com/repos/nmap/npcap/tags", + "ContentType": "application/json; charset=utf-8" + }, + "Download": { + "Uri": "https://npcap.com/dist/npcap-#version.exe", + "ReplaceText": "#version" + } + }, + "Install": { + "Setup": "npcap-*.exe", + "Preinstall": "", + "Physical": { + "Arguments": "/S", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} \ No newline at end of file From e4a091f1cce74501bfbc2f316868609017948c03 Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Tue, 9 Jan 2024 08:33:36 +0100 Subject: [PATCH 03/13] Silent install is not supported in the free version. Removed the /S argument. --- Evergreen/Manifests/Npcap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Manifests/Npcap.json b/Evergreen/Manifests/Npcap.json index 9fc4e0eb..c39f66a0 100644 --- a/Evergreen/Manifests/Npcap.json +++ b/Evergreen/Manifests/Npcap.json @@ -15,7 +15,7 @@ "Setup": "npcap-*.exe", "Preinstall": "", "Physical": { - "Arguments": "/S", + "Arguments": "", "PostInstall": [] }, "Virtual": { From 78396cad6a8487b946b91ea76e58aebf848a4272 Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Thu, 11 Jan 2024 11:46:40 +0100 Subject: [PATCH 04/13] New App: Jabra Direct --- Evergreen/Apps/Get-JabraDirect.ps1 | 33 ++++++++++++++++++++++++++++ Evergreen/Manifests/JabraDirect.json | 20 +++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 Evergreen/Apps/Get-JabraDirect.ps1 create mode 100644 Evergreen/Manifests/JabraDirect.json diff --git a/Evergreen/Apps/Get-JabraDirect.ps1 b/Evergreen/Apps/Get-JabraDirect.ps1 new file mode 100644 index 00000000..ce0a36b2 --- /dev/null +++ b/Evergreen/Apps/Get-JabraDirect.ps1 @@ -0,0 +1,33 @@ +Function Get-JabraDirect { + <# + .SYNOPSIS + Returns the latest Jabra Direct version. + + .NOTES + Author: Jasper Metselaar + E-mail: jms@du.se + #> + [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 + } +} diff --git a/Evergreen/Manifests/JabraDirect.json b/Evergreen/Manifests/JabraDirect.json new file mode 100644 index 00000000..79368b6a --- /dev/null +++ b/Evergreen/Manifests/JabraDirect.json @@ -0,0 +1,20 @@ +{ + "Name": "JabraDirect", + "Source": "https://www.jabra.se/software-and-services/jabra-direct", + "Get": { + "Update": { + "Uri": "https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/jdo.json" + } + }, + "Install": { + "Setup": "JabraDirectSetup.exe", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} \ No newline at end of file From 4664458a5324eb6a237ac96e44b987db912b8801 Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Thu, 11 Jan 2024 11:50:10 +0100 Subject: [PATCH 05/13] Updated Source URL to the international (en-US) site. --- Evergreen/Manifests/JabraDirect.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Manifests/JabraDirect.json b/Evergreen/Manifests/JabraDirect.json index 79368b6a..63d8853b 100644 --- a/Evergreen/Manifests/JabraDirect.json +++ b/Evergreen/Manifests/JabraDirect.json @@ -1,6 +1,6 @@ { "Name": "JabraDirect", - "Source": "https://www.jabra.se/software-and-services/jabra-direct", + "Source": "https://www.jabra.com/software-and-services/jabra-direct", "Get": { "Update": { "Uri": "https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/jdo.json" From 9f9c565ee629c7a6b31cd719443bcad5ac99f15e Mon Sep 17 00:00:00 2001 From: Kirill Trofimov Date: Fri, 12 Jan 2024 11:21:25 +0100 Subject: [PATCH 06/13] Add Microsoft WSL --- Evergreen/Apps/Get-MicrosoftWSL.ps1 | 26 ++++++++++++++++++++++++++ Evergreen/Manifests/MicrosoftWSL.json | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 Evergreen/Apps/Get-MicrosoftWSL.ps1 create mode 100644 Evergreen/Manifests/MicrosoftWSL.json diff --git a/Evergreen/Apps/Get-MicrosoftWSL.ps1 b/Evergreen/Apps/Get-MicrosoftWSL.ps1 new file mode 100644 index 00000000..dec2e08a --- /dev/null +++ b/Evergreen/Apps/Get-MicrosoftWSL.ps1 @@ -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 +} diff --git a/Evergreen/Manifests/MicrosoftWSL.json b/Evergreen/Manifests/MicrosoftWSL.json new file mode 100644 index 00000000..454a27fa --- /dev/null +++ b/Evergreen/Manifests/MicrosoftWSL.json @@ -0,0 +1,23 @@ +{ + "Name": "Microsoft WSL", + "Source": "https://github.com/microsoft/wsl/", + "Get": { + "Uri": "https://api.github.com/repos/microsoft/wsl/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.msixbundle$|\\.msi$" + }, + "Install": { + "Setup": "", + "Preinstall": "", + "Physical": { + "Arguments": "", + "PostInstall": [ + ] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [ + ] + } + } +} From 29d5675b4db5ede24214227b1bcb2c85e50fc8e6 Mon Sep 17 00:00:00 2001 From: Kirill Trofimov Date: Wed, 24 Jan 2024 11:01:49 +0100 Subject: [PATCH 07/13] Add Podman Desktop --- Evergreen/Apps/Get-PodmanDesktop.ps1 | 34 +++++++++++++++++++++++ Evergreen/Manifests/PodmanDesktop.json | 20 +++++++++++++ Evergreen/Private/Get-InstallerType.ps1 | 1 + tests/Private/Get-InstallerType.Tests.ps1 | 8 ++++++ 4 files changed, 63 insertions(+) create mode 100644 Evergreen/Apps/Get-PodmanDesktop.ps1 create mode 100644 Evergreen/Manifests/PodmanDesktop.json diff --git a/Evergreen/Apps/Get-PodmanDesktop.ps1 b/Evergreen/Apps/Get-PodmanDesktop.ps1 new file mode 100644 index 00000000..a21ff757 --- /dev/null +++ b/Evergreen/Apps/Get-PodmanDesktop.ps1 @@ -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 +} diff --git a/Evergreen/Manifests/PodmanDesktop.json b/Evergreen/Manifests/PodmanDesktop.json new file mode 100644 index 00000000..b7ea822f --- /dev/null +++ b/Evergreen/Manifests/PodmanDesktop.json @@ -0,0 +1,20 @@ +{ + "Name": "Podman Desktop", + "Source": "https://github.com/containers/podman-desktop", + "Get": { + "Uri": "https://api.github.com/repos/containers/podman-desktop/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.exe$" + }, + "Install": { + "Setup": "podman-desktop*.exe", + "Physical": { + "Arguments": "/S", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} diff --git a/Evergreen/Private/Get-InstallerType.ps1 b/Evergreen/Private/Get-InstallerType.ps1 index 33b3cd8f..dd3304c2 100644 --- a/Evergreen/Private/Get-InstallerType.ps1 +++ b/Evergreen/Private/Get-InstallerType.ps1 @@ -12,6 +12,7 @@ function Get-InstallerType { "portable" { $Type = "Portable"; break } "no-installer" { $Type = "Portable"; break } "debug" { $Type = "Debug"; break } + "airgap" { $Type = "Airgap"; break } default { Write-Verbose -Message "$($MyInvocation.MyCommand): Installer type not found in $String, defaulting to 'Default'." $Type = "Default" diff --git a/tests/Private/Get-InstallerType.Tests.ps1 b/tests/Private/Get-InstallerType.Tests.ps1 index 6fa302b6..65b51fb5 100644 --- a/tests/Private/Get-InstallerType.Tests.ps1 +++ b/tests/Private/Get-InstallerType.Tests.ps1 @@ -41,5 +41,13 @@ Describe -Name "Get-InstallerType" { Get-InstallerType -String $Url | Should -Be "Debug" } } + + It "Returns Airgap given an airgap URL" { + InModuleScope -ModuleName "Evergreen" { + $Url = "https://github.com/containers/podman-desktop/releases/download/v1.6.4/podman-desktop-airgap-1.6.4-x64.exe" + Get-InstallerType -String $Url | Should -Be "Airgap" + } + } + } } From 2dd61dba6b844f849adb362891cf63471a12f423 Mon Sep 17 00:00:00 2001 From: Kirill Trofimov Date: Thu, 25 Jan 2024 09:42:15 +0100 Subject: [PATCH 08/13] Add Podman --- Evergreen/Apps/Get-Podman.ps1 | 27 +++++++++++++++++++++++++++ Evergreen/Manifests/Podman.json | 20 ++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 Evergreen/Apps/Get-Podman.ps1 create mode 100644 Evergreen/Manifests/Podman.json diff --git a/Evergreen/Apps/Get-Podman.ps1 b/Evergreen/Apps/Get-Podman.ps1 new file mode 100644 index 00000000..2c7c97c4 --- /dev/null +++ b/Evergreen/Apps/Get-Podman.ps1 @@ -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 +} diff --git a/Evergreen/Manifests/Podman.json b/Evergreen/Manifests/Podman.json new file mode 100644 index 00000000..19cf2fcd --- /dev/null +++ b/Evergreen/Manifests/Podman.json @@ -0,0 +1,20 @@ +{ + "Name": "Podman", + "Source": "https://github.com/containers/podman", + "Get": { + "Uri": "https://api.github.com/repos/containers/podman/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.exe$" + }, + "Install": { + "Setup": "podman-*.exe", + "Physical": { + "Arguments": "/install /quiet /norestart", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} From 7c3e85f90a06ce94ae76042fada92cb7692db125 Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Thu, 25 Jan 2024 11:23:45 +0100 Subject: [PATCH 09/13] New Application: DB Browser for SQLite --- Evergreen/Apps/Get-DBBrowserforSQLite.ps1 | 28 +++++++++++++++++++++ Evergreen/Manifests/DBBrowserforSQLite.json | 20 +++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 Evergreen/Apps/Get-DBBrowserforSQLite.ps1 create mode 100644 Evergreen/Manifests/DBBrowserforSQLite.json diff --git a/Evergreen/Apps/Get-DBBrowserforSQLite.ps1 b/Evergreen/Apps/Get-DBBrowserforSQLite.ps1 new file mode 100644 index 00000000..7a5036fc --- /dev/null +++ b/Evergreen/Apps/Get-DBBrowserforSQLite.ps1 @@ -0,0 +1,28 @@ +Function Get-DBBrowserforSQLite { + <# + .SYNOPSIS + Returns the available DB Browser for SQLite versions. + + .NOTES + Author: Jasper Metselaar + E-mail: jms@du.se + #> + [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 +} diff --git a/Evergreen/Manifests/DBBrowserforSQLite.json b/Evergreen/Manifests/DBBrowserforSQLite.json new file mode 100644 index 00000000..e60c7854 --- /dev/null +++ b/Evergreen/Manifests/DBBrowserforSQLite.json @@ -0,0 +1,20 @@ +{ + "Name": "DB Browser for SQLite", + "Source": "https://sqlitebrowser.org/", + "Get": { + "Uri": "https://api.github.com/repos/sqlitebrowser/sqlitebrowser/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.msi$|\\.zip$" + }, + "Install": { + "Setup": "DB.Browser.for.SQLite-*.msi", + "Physical": { + "Arguments": "", + "PostInstall": [] + }, + "Virtual": { + "Arguments": "", + "PostInstall": [] + } + } +} From a4f884e1878bbd63f758a00b326aea194f6fc68a Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Thu, 25 Jan 2024 11:30:27 +0100 Subject: [PATCH 10/13] Added the portable installer. --- Evergreen/Manifests/DBBrowserforSQLite.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Manifests/DBBrowserforSQLite.json b/Evergreen/Manifests/DBBrowserforSQLite.json index e60c7854..8d8cc01a 100644 --- a/Evergreen/Manifests/DBBrowserforSQLite.json +++ b/Evergreen/Manifests/DBBrowserforSQLite.json @@ -4,7 +4,7 @@ "Get": { "Uri": "https://api.github.com/repos/sqlitebrowser/sqlitebrowser/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", - "MatchFileTypes": "\\.msi$|\\.zip$" + "MatchFileTypes": "\\.msi$|\\.zip$|\\.exe$" }, "Install": { "Setup": "DB.Browser.for.SQLite-*.msi", From 1d723154a0ac467fb9ad6e84721cf8075a17d9e7 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sat, 10 Feb 2024 19:03:55 +1100 Subject: [PATCH 11/13] Update MicrosoftPowerShell.json #624 --- Evergreen/Manifests/MicrosoftPowerShell.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Manifests/MicrosoftPowerShell.json b/Evergreen/Manifests/MicrosoftPowerShell.json index 7802d73c..e53ded98 100644 --- a/Evergreen/Manifests/MicrosoftPowerShell.json +++ b/Evergreen/Manifests/MicrosoftPowerShell.json @@ -12,7 +12,7 @@ }, "Uri": "https://api.github.com/repos/PowerShell/PowerShell/releases/tags/", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", - "MatchFileTypes": "\\.exe$|\\.msi$" + "MatchFileTypes": "\\.exe$|\\.msi$|\\.msixbundle$" } }, "Install": { From 4cf5a4e13ca4306df070c153d5decd701bddd386 Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Tue, 13 Feb 2024 09:22:59 +0100 Subject: [PATCH 12/13] [New App]: Adobe Digital Editons --- Evergreen/Apps/Get-AdobeDigitalEditions.ps1 | 45 +++++++++++++++++++ Evergreen/Manifests/AdobeDigitalEditions.json | 21 +++++++++ 2 files changed, 66 insertions(+) create mode 100644 Evergreen/Apps/Get-AdobeDigitalEditions.ps1 create mode 100644 Evergreen/Manifests/AdobeDigitalEditions.json diff --git a/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 b/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 new file mode 100644 index 00000000..d40cef30 --- /dev/null +++ b/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 @@ -0,0 +1,45 @@ +Function Get-AdobeDigitalEditions { + <# + .SYNOPSIS + Gets the version and download URLs for Adobe Digital Editions. + + .NOTES + Author: Jasper Metselaar + E-mail: jms@du.se + #> + [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 + ContentType = $res.Get.Update.ContentType + } + $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)." + } +} \ No newline at end of file diff --git a/Evergreen/Manifests/AdobeDigitalEditions.json b/Evergreen/Manifests/AdobeDigitalEditions.json new file mode 100644 index 00000000..313bdb49 --- /dev/null +++ b/Evergreen/Manifests/AdobeDigitalEditions.json @@ -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": [] + } + } +} \ No newline at end of file From 0066d88bd168c41ee055b6dbba2628f86b45b7ec Mon Sep 17 00:00:00 2001 From: Jasper Metselaar Date: Tue, 13 Feb 2024 10:43:15 +0100 Subject: [PATCH 13/13] Removed Content type, since it isn't used. --- Evergreen/Apps/Get-AdobeDigitalEditions.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 b/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 index d40cef30..be782e19 100644 --- a/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 +++ b/Evergreen/Apps/Get-AdobeDigitalEditions.ps1 @@ -18,7 +18,6 @@ Function Get-AdobeDigitalEditions { $params = @{ Uri = $res.Get.Update.Uri - ContentType = $res.Get.Update.ContentType } $updateFeed = Invoke-EvergreenRestMethod @params