From 3debca341372e4ab1d4cb79b32b91a6c23ace830 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Mon, 24 Jun 2024 12:40:50 +1000 Subject: [PATCH 01/11] Remove whitespace at end of lines --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/ISSUE_TEMPLATE/new-app.yml | 2 +- Evergreen/Evergreen.psd1 | 12 ++++++------ Evergreen/Manifests/ArtifexGhostscript.json | 2 +- Evergreen/Manifests/Flameshot.json | 2 +- Evergreen/Manifests/FreeFem.json | 2 +- Evergreen/Manifests/Gephi.json | 2 +- Evergreen/Manifests/Gimp.json | 2 +- Evergreen/Manifests/MiniZincIDE.json | 2 +- Evergreen/Manifests/MozillaFirefox.json | 6 +++--- Evergreen/Manifests/MozillaThunderbird.json | 6 +++--- Evergreen/Manifests/MuseScore.json | 2 +- Evergreen/Manifests/Pandoc.json | 2 +- Evergreen/Manifests/Praat.json | 2 +- Evergreen/Manifests/Protege.json | 2 +- Evergreen/Manifests/RDAnalyzer.json | 2 +- Evergreen/Manifests/SafeExamBrowser.json | 2 +- Evergreen/Manifests/TeXstudio.json | 2 +- Evergreen/Manifests/WinMerge.json | 2 +- Evergreen/Private/Invoke-EvergreenWebRequest.ps1 | 2 +- docs/changelog.md | 4 ++-- 22 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9137d58f..be0ecfe6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -49,7 +49,7 @@ body: id: documentation attributes: label: Have you reviewed the documentation? - description: "Please confirm that you've reviewed the following links:" + description: "Please confirm that you've reviewed the following links:" options: - label: "Troubleshooting at: https://stealthpuppy.com/evergreen/troubleshoot/" - label: "Known issues at: https://stealthpuppy.com/evergreen/issues/" diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index d9011b6d..6c47c0e2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -28,7 +28,7 @@ body: id: documentation attributes: label: Have you reviewed the documentation? - description: "Please confirm that you've reviewed the documentation before making this feature request." + description: "Please confirm that you've reviewed the documentation before making this feature request." options: - label: "Documentation at: https://stealthpuppy.com/evergreen/" validations: diff --git a/.github/ISSUE_TEMPLATE/new-app.yml b/.github/ISSUE_TEMPLATE/new-app.yml index e7f3d162..5ad31c61 100644 --- a/.github/ISSUE_TEMPLATE/new-app.yml +++ b/.github/ISSUE_TEMPLATE/new-app.yml @@ -47,7 +47,7 @@ body: id: documentation attributes: label: "Have you reviewed the list of supported applications?" - description: "Please confirm that you've reviewed the list of currently supported before making this application request." + description: "Please confirm that you've reviewed the list of currently supported before making this application request." options: - label: "Supported apps at: https://stealthpuppy.com/evergreen/apps/" required: true diff --git a/Evergreen/Evergreen.psd1 b/Evergreen/Evergreen.psd1 index 87bcf477..ae9b4580 100644 --- a/Evergreen/Evergreen.psd1 +++ b/Evergreen/Evergreen.psd1 @@ -69,11 +69,11 @@ PowerShellVersion = '3.0' # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. -FunctionsToExport = @('Export-EvergreenApp', 'Export-EvergreenManifest', - 'Find-EvergreenApp', 'Get-EvergreenApp', 'Get-EvergreenAppFromApi', - 'Get-EvergreenEndpointFromApi', 'Get-EvergreenLibrary', - 'Get-EvergreenLibraryApp', 'New-EvergreenLibrary', - 'Save-EvergreenApp', 'Start-EvergreenLibraryUpdate', +FunctionsToExport = @('Export-EvergreenApp', 'Export-EvergreenManifest', + 'Find-EvergreenApp', 'Get-EvergreenApp', 'Get-EvergreenAppFromApi', + 'Get-EvergreenEndpointFromApi', 'Get-EvergreenLibrary', + 'Get-EvergreenLibraryApp', 'New-EvergreenLibrary', + 'Save-EvergreenApp', 'Start-EvergreenLibraryUpdate', 'Test-EvergreenApp') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. @@ -83,7 +83,7 @@ CmdletsToExport = @() # VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'sea', 'gea', 'fea', 'tea', 'iea', 'Invoke-EvergreenLibraryUpdate', +AliasesToExport = 'sea', 'gea', 'fea', 'tea', 'iea', 'Invoke-EvergreenLibraryUpdate', 'Invoke-EvergreenApp', 'Get-EvergreenEndpoint' # DSC resources to export from this module diff --git a/Evergreen/Manifests/ArtifexGhostscript.json b/Evergreen/Manifests/ArtifexGhostscript.json index 1ae96e8a..d116e221 100644 --- a/Evergreen/Manifests/ArtifexGhostscript.json +++ b/Evergreen/Manifests/ArtifexGhostscript.json @@ -1,7 +1,7 @@ { "Name": "Artifex Ghostscript", "Source": "https://www.ghostscript.com/", - + "Get": { "Uri": "https://api.github.com/repos/ArtifexSoftware/ghostpdl-downloads/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/Flameshot.json b/Evergreen/Manifests/Flameshot.json index 7dc0007d..1e9f34b5 100644 --- a/Evergreen/Manifests/Flameshot.json +++ b/Evergreen/Manifests/Flameshot.json @@ -1,7 +1,7 @@ { "Name": "Flameshot", "Source": "https://flameshot.org/", - + "Get": { "Uri": "https://api.github.com/repos/flameshot-org/flameshot/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/FreeFem.json b/Evergreen/Manifests/FreeFem.json index 7b2dd875..332ed1ce 100644 --- a/Evergreen/Manifests/FreeFem.json +++ b/Evergreen/Manifests/FreeFem.json @@ -1,7 +1,7 @@ { "Name": "FreeFem", "Source": "https://freefem.org/", - + "Get": { "Uri": "https://api.github.com/repos/FreeFem/FreeFem-sources/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/Gephi.json b/Evergreen/Manifests/Gephi.json index ac70fd2d..8f78dadd 100644 --- a/Evergreen/Manifests/Gephi.json +++ b/Evergreen/Manifests/Gephi.json @@ -1,7 +1,7 @@ { "Name": "Gephi", "Source": "https://gephi.org/", - + "Get": { "Uri": "https://api.github.com/repos/gephi/gephi/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/Gimp.json b/Evergreen/Manifests/Gimp.json index f4a00b97..d1f3f66c 100644 --- a/Evergreen/Manifests/Gimp.json +++ b/Evergreen/Manifests/Gimp.json @@ -13,7 +13,7 @@ "Download": { "Uri": "https://download.gimp.org/mirror/pub/gimp/v#minorversion/windows/#filename", "ReplaceFileName": "#filename", - "ReplaceVersion": "#minorversion" + "ReplaceVersion": "#minorversion" } }, "Install": { diff --git a/Evergreen/Manifests/MiniZincIDE.json b/Evergreen/Manifests/MiniZincIDE.json index 756e762a..dac21f49 100644 --- a/Evergreen/Manifests/MiniZincIDE.json +++ b/Evergreen/Manifests/MiniZincIDE.json @@ -1,7 +1,7 @@ { "Name": "MiniZinc IDE", "Source": "https://www.minizinc.org/", - + "Get": { "Uri": "https://api.github.com/repos/MiniZinc/MiniZincIDE/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/MozillaFirefox.json b/Evergreen/Manifests/MozillaFirefox.json index 73aabb36..5e1b46e1 100644 --- a/Evergreen/Manifests/MozillaFirefox.json +++ b/Evergreen/Manifests/MozillaFirefox.json @@ -24,17 +24,17 @@ "Msi": "https://download.mozilla.org/?product=firefox-esr-msi-latest-ssl&os=#platform&lang=#language", "Msix": "https://download.mozilla.org/?product=firefox-esr-msix-latest-ssl&os=#platform&lang=#language" }, - "FIREFOX_ESR_NEXT": { + "FIREFOX_ESR_NEXT": { "Exe": "https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=#platform&lang=#language", "Msi": "https://download.mozilla.org/?product=firefox-esr-next-msi-latest-ssl&os=#platform&lang=#language", "Msix": "https://download.mozilla.org/?product=firefox-esr-next-msix-latest-ssl&os=#platform&lang=#language" }, - "FIREFOX_DEVEDITION": { + "FIREFOX_DEVEDITION": { "Exe": "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=#platform&lang=#language", "Msi": "https://download.mozilla.org/?product=firefox-devedition-msi-latest-ssl&os=#platform&lang=#language", "Msix": "https://download.mozilla.org/?product=firefox-devedition-next-msix-latest-ssl&os=#platform&lang=#language" }, - "LATEST_FIREFOX_RELEASED_DEVEL_VERSION": { + "LATEST_FIREFOX_RELEASED_DEVEL_VERSION": { "Exe": "https://download.mozilla.org/?product=firefox-beta-latest-ssl&os=#platform&lang=#language", "Msi": "https://download.mozilla.org/?product=firefox-beta-msi-latest-ssl&os=#platform&lang=#language", "Msix": "https://download.mozilla.org/?product=firefox-beta-next-msix-latest-ssl&os=#platform&lang=#language" diff --git a/Evergreen/Manifests/MozillaThunderbird.json b/Evergreen/Manifests/MozillaThunderbird.json index b171fcd7..8d8a0d3e 100644 --- a/Evergreen/Manifests/MozillaThunderbird.json +++ b/Evergreen/Manifests/MozillaThunderbird.json @@ -19,14 +19,14 @@ "Exe": "https://download.mozilla.org/?product=thunderbird-esr-latest-ssl&os=#platform&lang=#language", "Msi": "https://download.mozilla.org/?product=thunderbird-esr-msi-latest-ssl&os=#platform&lang=#language" }, - "THUNDERBIRD_ESR_NEXT": { + "THUNDERBIRD_ESR_NEXT": { "Exe": "https://download.mozilla.org/?product=thunderbird-esr-next-latest-ssl&os=#platform&lang=#language", "Msi": "https://download.mozilla.org/?product=thunderbird-esr-next-msi-latest-ssl&os=#platform&lang=#language" }, - "LATEST_THUNDERBIRD_DEVEL_VERSION": { + "LATEST_THUNDERBIRD_DEVEL_VERSION": { "Exe": "https://download.mozilla.org/?product=thunderbird-beta-latest-ssl&os=#platform&lang=#language", "Msi": "https://download.mozilla.org/?product=thunderbird-beta-msi-latest-ssl&os=#platform&lang=#language" - + } }, "Msix": "http://archive.mozilla.org/pub/thunderbird/releases/#version/#platform/multi/Thunderbird%20Setup%20#version.msix", diff --git a/Evergreen/Manifests/MuseScore.json b/Evergreen/Manifests/MuseScore.json index 08b62a81..5628bb27 100644 --- a/Evergreen/Manifests/MuseScore.json +++ b/Evergreen/Manifests/MuseScore.json @@ -1,7 +1,7 @@ { "Name": "MuseScore", "Source": "https://musescore.org/", - + "Get": { "Uri": "https://api.github.com/repos/musescore/MuseScore/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/Pandoc.json b/Evergreen/Manifests/Pandoc.json index cc07f49b..13cb8e8f 100644 --- a/Evergreen/Manifests/Pandoc.json +++ b/Evergreen/Manifests/Pandoc.json @@ -1,7 +1,7 @@ { "Name": "Pandoc", "Source": "https://pandoc.org/", - + "Get": { "Uri": "https://api.github.com/repos/jgm/pandoc/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/Praat.json b/Evergreen/Manifests/Praat.json index f991c127..47af7fdc 100644 --- a/Evergreen/Manifests/Praat.json +++ b/Evergreen/Manifests/Praat.json @@ -1,7 +1,7 @@ { "Name": "Praat", "Source": "https://www.fon.hum.uva.nl/praat/", - + "Get": { "Uri": "https://api.github.com/repos/praat/praat/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/Protege.json b/Evergreen/Manifests/Protege.json index 2f41be39..687527ad 100644 --- a/Evergreen/Manifests/Protege.json +++ b/Evergreen/Manifests/Protege.json @@ -1,7 +1,7 @@ { "Name": "Protege", "Source": "https://protege.stanford.edu/", - + "Get": { "Uri": "https://api.github.com/repos/protegeproject/protege-distribution/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/RDAnalyzer.json b/Evergreen/Manifests/RDAnalyzer.json index a5a26f2c..9c99d428 100644 --- a/Evergreen/Manifests/RDAnalyzer.json +++ b/Evergreen/Manifests/RDAnalyzer.json @@ -1,7 +1,7 @@ { "Name": "Remote Desktop Analyzer", "Source": "https://rdanalyzer.com/", - + "Get": { "Uri": "https://api.github.com/repos/RDAnalyzer/release/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/SafeExamBrowser.json b/Evergreen/Manifests/SafeExamBrowser.json index a963ab73..ed31ba47 100644 --- a/Evergreen/Manifests/SafeExamBrowser.json +++ b/Evergreen/Manifests/SafeExamBrowser.json @@ -1,7 +1,7 @@ { "Name": "Safe Exam Browser", "Source": "https://safeexambrowser.org/", - + "Get": { "Uri": "https://api.github.com/repos/SafeExamBrowser/seb-win-refactoring/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/TeXstudio.json b/Evergreen/Manifests/TeXstudio.json index 8bbb2f4e..042354bd 100644 --- a/Evergreen/Manifests/TeXstudio.json +++ b/Evergreen/Manifests/TeXstudio.json @@ -1,7 +1,7 @@ { "Name": "TeXstudio", "Source": "https://www.texstudio.org/", - + "Get": { "Uri": "https://api.github.com/repos/texstudio-org/texstudio/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Manifests/WinMerge.json b/Evergreen/Manifests/WinMerge.json index 35f22317..e8430549 100644 --- a/Evergreen/Manifests/WinMerge.json +++ b/Evergreen/Manifests/WinMerge.json @@ -1,7 +1,7 @@ { "Name": "WinMerge", "Source": "https://winmerge.org/", - + "Get": { "Uri": "https://api.github.com/repos/WinMerge/winmerge/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", diff --git a/Evergreen/Private/Invoke-EvergreenWebRequest.ps1 b/Evergreen/Private/Invoke-EvergreenWebRequest.ps1 index 7ee4d8e6..01f0f4bd 100644 --- a/Evergreen/Private/Invoke-EvergreenWebRequest.ps1 +++ b/Evergreen/Private/Invoke-EvergreenWebRequest.ps1 @@ -66,7 +66,7 @@ public class TrustAllCertsPolicy : ICertificatePolicy { } } "@ - Write-Verbose -Message "$($MyInvocation.MyCommand): Trust all certificates." + Write-Verbose -Message "$($MyInvocation.MyCommand): Trust all certificates." [System.Net.ServicePointManager]::CertificatePolicy = New-Object -TypeName "TrustAllCertsPolicy" } diff --git a/docs/changelog.md b/docs/changelog.md index bbfb3370..3e1f7b77 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -86,7 +86,7 @@ BREAKING CHANGES ## 2405.943 -* Update default user agent #642 +* Update default user agent #642 * Fix an issue with `Get-Architecture` returning `AMD64` [#663](https://github.com/aaronparker/evergreen/issues/663) * Adds `Get-EvergreenAppFromApi`, `Start-EvergreenLibraryUpdate` aliases. Public functions will be renamed in a future release * Fix various issues with help URI links for public functions @@ -134,7 +134,7 @@ BREAKING CHANGES * Updates `Microsoft.NET` for all available supported channels [#583](https://github.com/aaronparker/evergreen/issues/583) * Updates `mySQLWorkbench` download URL * Updates source URL used in `MicrosoftSsms` to fix version numbers -* Updates `DruvainSyncClient` for Cloud and GovCloud releases +* Updates `DruvainSyncClient` for Cloud and GovCloud releases * Fix date property on `MicrosoftWvdMultimediaRedirection` ## 2310.868 From 7dfdb6662f9ee3bd7a35a1acde74a0ab772d4a37 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Fri, 19 Jul 2024 21:47:57 +1000 Subject: [PATCH 02/11] Update Save-EvergreenApp.ps1 --- Evergreen/Public/Save-EvergreenApp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Public/Save-EvergreenApp.ps1 b/Evergreen/Public/Save-EvergreenApp.ps1 index b4455c6a..127d547a 100644 --- a/Evergreen/Public/Save-EvergreenApp.ps1 +++ b/Evergreen/Public/Save-EvergreenApp.ps1 @@ -161,7 +161,7 @@ function Save-EvergreenApp { } # Output the parameters when using -Verbose foreach ($item in $params.GetEnumerator()) { - Write-Verbose -Message "nvoke-WebRequest parameter: $($item.name): $($item.value)." + Write-Verbose -Message "Invoke-WebRequest parameter: $($item.name): $($item.value)." } # Download the file if ($PSCmdlet.ShouldProcess($Object.URI, "Download")) { From eadfc097e8b1b451fa37c9d15df2717e1c0ce712 Mon Sep 17 00:00:00 2001 From: Kirill Trofimov Date: Wed, 24 Jul 2024 09:53:00 +0200 Subject: [PATCH 03/11] OBS Studio: Adding alt version using GitHub Releases --- Evergreen/Apps/Get-OBSStudioAlt.ps1 | 27 +++++++++++++++++++++++++++ Evergreen/Manifests/OBSStudioAlt.json | 23 +++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Evergreen/Apps/Get-OBSStudioAlt.ps1 create mode 100644 Evergreen/Manifests/OBSStudioAlt.json diff --git a/Evergreen/Apps/Get-OBSStudioAlt.ps1 b/Evergreen/Apps/Get-OBSStudioAlt.ps1 new file mode 100644 index 00000000..3080325f --- /dev/null +++ b/Evergreen/Apps/Get-OBSStudioAlt.ps1 @@ -0,0 +1,27 @@ +Function Get-OBSStudioAlt { + <# + .SYNOPSIS + Get the current version and download URI for OBS Studio. + + .NOTES + Author: Kirill Trofimov + #> + [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/OBSStudioAlt.json b/Evergreen/Manifests/OBSStudioAlt.json new file mode 100644 index 00000000..22bd9961 --- /dev/null +++ b/Evergreen/Manifests/OBSStudioAlt.json @@ -0,0 +1,23 @@ +{ + "Name": "OBS Studio Alt", + "Source": "https://obsproject.com/", + "Get": { + "Uri": "https://api.github.com/repos/obsproject/obs-studio/releases/latest", + "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", + "MatchFileTypes": "\\.exe$|\\.zip$" + }, + "Install": { + "Setup": "*.exe", + "Preinstall": "", + "Physical": { + "Arguments": "/S", + "PostInstall": [ + ] + }, + "Virtual": { + "Arguments": "/S", + "PostInstall": [ + ] + } + } +} From 8e754ef6cba49ff5bfcbdfcc5026705d6709afa6 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 28 Jul 2024 09:50:11 +1000 Subject: [PATCH 04/11] Update EvergreenLibraryTemplate.json Fix OneDrive architecture property --- Evergreen/EvergreenLibraryTemplate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/EvergreenLibraryTemplate.json b/Evergreen/EvergreenLibraryTemplate.json index 27cdb79a..49a9fee8 100644 --- a/Evergreen/EvergreenLibraryTemplate.json +++ b/Evergreen/EvergreenLibraryTemplate.json @@ -9,7 +9,7 @@ { "Name": "MicrosoftOneDrive", "EvergreenApp": "MicrosoftOneDrive", - "Filter": "$_.Architecture -eq \"AMD64\" -and $_.Ring -eq \"Production\" -and $_.Throttle -eq \"10\"" + "Filter": "$_.Architecture -eq \"x64\" -and $_.Ring -eq \"Production\" -and $_.Throttle -eq \"10\"" }, { "Name": "MicrosoftEdge", From b40c179f5d0351208a296488a1f30171b03dac7f Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 28 Jul 2024 17:16:51 +1000 Subject: [PATCH 05/11] Update Start-EvergreenLibraryUpdate.ps1 Update to support blank filters --- .../Public/Start-EvergreenLibraryUpdate.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 b/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 index b29d8ed4..87d6e777 100644 --- a/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 +++ b/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 @@ -50,18 +50,18 @@ function Start-EvergreenLibraryUpdate { Write-Verbose -Message "$($MyInvocation.MyCommand): Application path: $AppPath." Write-Verbose -Message "$($MyInvocation.MyCommand): Query Evergreen for: $($Application.Name)." - try { + # Gather the application version information from Get-EvergreenApp + if ([System.String]::IsNullOrEmpty($Application.Filter)) { + Write-Verbose -Message "$($MyInvocation.MyCommand): No filter specified for $($Application.Name)." + $App = Get-EvergreenApp -Name $Application.EvergreenApp @params + } + else { Write-Verbose -Message "$($MyInvocation.MyCommand): Filter: $($Application.Filter)." $WhereBlock = [ScriptBlock]::Create($Application.Filter) - } - catch { - throw $_ + [System.Array]$App = @() + $App = Get-EvergreenApp -Name $Application.EvergreenApp @params | Where-Object $WhereBlock } - # Gather the application version information from Get-EvergreenApp - [System.Array]$App = @() - $App = Get-EvergreenApp -Name $Application.EvergreenApp @params | Where-Object $WhereBlock - # If something returned, add to the library if ($null -ne $App) { Write-Verbose -Message "$($MyInvocation.MyCommand): Download count for $($Application.EvergreenApp): $($App.Count)." @@ -99,7 +99,7 @@ function Start-EvergreenLibraryUpdate { elseif ($null -ne $LibContentBefore) { (Compare-Object $LibContentBefore $LibContentAfter -Property FullName -IncludeEqual | ForEach-Object { [PSCustomObject]@{ - Installer = $_.Fullname + Installer = $_.FullName Status = $_.SideIndicator -replace "=>", "NEW" -replace "==", "UNCHANGED" -replace "<=", "DELETED" } }) From 25249862607409c240036994103496a8ba71d1ca Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 28 Jul 2024 17:18:41 +1000 Subject: [PATCH 06/11] Rename to Get-EvergreenAppFromLibrary --- ...EvergreenLibraryApp.ps1 => Get-EvergreenAppFromLibrary.ps1} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename Evergreen/Public/{Get-EvergreenLibraryApp.ps1 => Get-EvergreenAppFromLibrary.ps1} (95%) diff --git a/Evergreen/Public/Get-EvergreenLibraryApp.ps1 b/Evergreen/Public/Get-EvergreenAppFromLibrary.ps1 similarity index 95% rename from Evergreen/Public/Get-EvergreenLibraryApp.ps1 rename to Evergreen/Public/Get-EvergreenAppFromLibrary.ps1 index bc4a07b8..d26332c6 100644 --- a/Evergreen/Public/Get-EvergreenLibraryApp.ps1 +++ b/Evergreen/Public/Get-EvergreenAppFromLibrary.ps1 @@ -1,8 +1,9 @@ -function Get-EvergreenLibraryApp { +function Get-EvergreenAppFromLibrary { <# .EXTERNALHELP Evergreen-help.xml #> [OutputType([System.Management.Automation.PSObject])] + [Alias("Get-EvergreenLibraryApp")] [CmdletBinding(SupportsShouldProcess = $false)] param ( [Parameter( From 12e6efdd0deeb5e5e8e0f7572f30ba65c79d3c35 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 28 Jul 2024 17:20:58 +1000 Subject: [PATCH 07/11] Update Get-EvergreenLibrary Update to support an Evergreen Library on an Azure storage account --- Evergreen/Evergreen.psd1 | 4 +- Evergreen/Public/Get-EvergreenLibrary.ps1 | 153 +++++++++++++++------- 2 files changed, 106 insertions(+), 51 deletions(-) diff --git a/Evergreen/Evergreen.psd1 b/Evergreen/Evergreen.psd1 index f9230432..12ac3d5f 100644 --- a/Evergreen/Evergreen.psd1 +++ b/Evergreen/Evergreen.psd1 @@ -72,7 +72,7 @@ PowerShellVersion = '3.0' FunctionsToExport = @('Export-EvergreenApp', 'Export-EvergreenManifest', 'Find-EvergreenApp', 'Get-EvergreenApp', 'Get-EvergreenAppFromApi', 'Get-EvergreenEndpointFromApi', 'Get-EvergreenLibrary', - 'Get-EvergreenLibraryApp', 'New-EvergreenLibrary', + 'Get-EvergreenAppFromLibrary', 'New-EvergreenLibrary', 'Save-EvergreenApp', 'Start-EvergreenLibraryUpdate', 'Test-EvergreenApp') @@ -83,7 +83,7 @@ CmdletsToExport = @() # VariablesToExport = @() # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. -AliasesToExport = 'sea', 'gea', 'fea', 'tea', 'iea', 'Invoke-EvergreenLibraryUpdate', +AliasesToExport = 'sea', 'gea', 'fea', 'tea', 'iea', 'Invoke-EvergreenLibraryUpdate', 'Get-EvergreenLibraryApp', 'Invoke-EvergreenApp', 'Get-EvergreenEndpoint' # DSC resources to export from this module diff --git a/Evergreen/Public/Get-EvergreenLibrary.ps1 b/Evergreen/Public/Get-EvergreenLibrary.ps1 index 33a80a18..0b079187 100644 --- a/Evergreen/Public/Get-EvergreenLibrary.ps1 +++ b/Evergreen/Public/Get-EvergreenLibrary.ps1 @@ -10,87 +10,142 @@ function Get-EvergreenLibrary { ValueFromPipelineByPropertyName, HelpMessage = "Specify the path to the library.", ParameterSetName = "Path")] - [ValidateNotNull()] - [System.IO.FileInfo] $Path + [ValidateNotNullOrEmpty()] + [System.IO.FileInfo] $Path, + + [Parameter( + Mandatory = $true, + Position = 0, + ValueFromPipelineByPropertyName, + HelpMessage = "Specify the URI to the library.", + ParameterSetName = "URI")] + [ValidateNotNullOrEmpty()] + [ValidateScript( { + if ($_ -match "^(https:\/\/([a-zA-Z0-9_\-\.]+)\/([a-zA-Z0-9_-]+)\/EvergreenLibrary.json)$") { + $true + } + else { + throw "'$_' must be in the format 'https:////EvergreenLibrary.json'." + } + })] + [System.Uri] $Uri ) begin { + if ($PSBoundParameters.ContainsKey("Uri")) { + $Library = Invoke-EvergreenRestMethod -Uri $Uri + $ParentUri = Split-Path -Path $Uri -Parent + + # Build the output object + $Output = [PSCustomObject] @{ + "Library" = $Library + "Inventory" = (New-Object -TypeName "System.Collections.ArrayList") + } + } } process { - if (Test-Path -Path $Path -PathType "Container") { - $LibraryFile = $(Join-Path -Path $Path -ChildPath "EvergreenLibrary.json") - - if (Test-Path -Path $LibraryFile) { - Write-Verbose -Message "Library exists: $LibraryFile." + # Build the inventory from a Library on $Uri + if ($PSBoundParameters.ContainsKey("Uri")) { + foreach ($Application in $Library.Applications) { + # Add details for the application to the output object try { - # Read the library file - Write-Verbose -Message "Read: $LibraryFile." - $Library = Get-Content -Path $LibraryFile | ConvertFrom-Json + $AppUri = "$($ParentUri)/$($Application.Name)/$($Application.Name).json" + $Versions = Invoke-EvergreenRestMethod -Uri $AppUri } catch { - throw $_ + Write-Warning -Message "Encountered an error reading $AppUri with: $($_.Exception.Message)" + } + + # Add details for this application + $App = [PSCustomObject] @{ + ApplicationName = $Application.Name + Versions = $Versions } + $Output.Inventory.Add($App) | Out-Null + } + + # Output the object to the pipeline + Write-Output -InputObject $Output + } - if ($null -ne $Library) { + # Build the inventory from a Library on $Path + if ($PSBoundParameters.ContainsKey("Path")) { + if (Test-Path -Path $Path -PathType "Container") { + $LibraryFile = $(Join-Path -Path $Path -ChildPath "EvergreenLibrary.json") - # Build the output object - $Output = [PSCustomObject] @{ - "Library" = $Library - "Inventory" = (New-Object -TypeName "System.Collections.ArrayList") + if (Test-Path -Path $LibraryFile) { + Write-Verbose -Message "Library exists: $LibraryFile." + + try { + # Read the library file + Write-Verbose -Message "Read: $LibraryFile." + $Library = Get-Content -Path $LibraryFile | ConvertFrom-Json + } + catch { + throw $_ } - foreach ($Application in $Library.Applications) { + if ($null -ne $Library) { - # Add details for the application to the output object - $AppPath = $(Join-Path -Path $Path -ChildPath $Application.Name) - if (Test-Path -Path $AppPath) { + # Build the output object + $Output = [PSCustomObject] @{ + "Library" = $Library + "Inventory" = (New-Object -TypeName "System.Collections.ArrayList") + } - $AppManifest = $(Join-Path -Path $AppPath -ChildPath "$($Application.Name).json") - if (Test-Path -Path $AppManifest) { + foreach ($Application in $Library.Applications) { - try { - Write-Verbose -Message "Read: $AppManifest." - $Versions = Get-Content -Path $AppManifest | ConvertFrom-Json - } - catch { - Write-Warning -Message "Encountered an error reading $AppManifest with: $($_.Exception.Message)" - } + # Add details for the application to the output object + $AppPath = $(Join-Path -Path $Path -ChildPath $Application.Name) + if (Test-Path -Path $AppPath) { + + $AppManifest = $(Join-Path -Path $AppPath -ChildPath "$($Application.Name).json") + if (Test-Path -Path $AppManifest) { + + try { + Write-Verbose -Message "Read: $AppManifest." + $Versions = Get-Content -Path $AppManifest | ConvertFrom-Json + } + catch { + Write-Warning -Message "Encountered an error reading $AppManifest with: $($_.Exception.Message)" + } - try { - # Add details for this application - $App = [PSCustomObject] @{ - ApplicationName = $Application.Name - Versions = $Versions + try { + # Add details for this application + $App = [PSCustomObject] @{ + ApplicationName = $Application.Name + Versions = $Versions + } + $Output.Inventory.Add($App) | Out-Null } - $Output.Inventory.Add($App) | Out-Null + catch { + Write-Warning -Message "Encountered an error adding details for $($Application.Name) with: $($_.Exception.Message)" + } + } - catch { - Write-Warning -Message "Encountered an error adding details for $($Application.Name) with: $($_.Exception.Message)" + else { + Write-Warning -Message "Unable to find $AppManifest. Update the library with Invoke-EvergreenLibraryUpdate." } - } else { - Write-Warning -Message "Unable to find $AppManifest. Update the library with Invoke-EvergreenLibraryUpdate." + Write-Warning -Message "Unable to find $AppPath. Update the library with Invoke-EvergreenLibraryUpdate." } } - else { - Write-Warning -Message "Unable to find $AppPath. Update the library with Invoke-EvergreenLibraryUpdate." - } - } - # Output the object to the pipeline - Write-Output -InputObject $Output + # Output the object to the pipeline + Write-Output -InputObject $Output + } + } + else { + throw [System.IO.FileNotFoundException] "$Path is not an Evergreen Library. Cannot find EvergreenLibrary.json. Create a library with New-EvergreenLibrary." } } else { - throw [System.IO.FileNotFoundException] "$Path is not an Evergreen Library. Cannot find EvergreenLibrary.json. Create a library with New-EvergreenLibrary." + throw [System.IO.DirectoryNotFoundException] "Cannot use path $Path because it does not exist or is not a directory." } } - else { - throw [System.IO.DirectoryNotFoundException] "Cannot use path $Path because it does not exist or is not a directory." - } } end {} From 5f7f729f9cae9f4e495578e2eeabf1e3d439b43b Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Sun, 28 Jul 2024 21:48:09 +1000 Subject: [PATCH 08/11] Update help --- Evergreen/en-US/Evergreen-help.xml | 38 +++++++++++++++++++-- docs/changelog.md | 9 +++++ docs/help/en-US/Get-EvergreenLibrary.md | 45 +++++++++++++++++++++---- 3 files changed, 83 insertions(+), 9 deletions(-) diff --git a/Evergreen/en-US/Evergreen-help.xml b/Evergreen/en-US/Evergreen-help.xml index c716fee7..d96294ab 100644 --- a/Evergreen/en-US/Evergreen-help.xml +++ b/Evergreen/en-US/Evergreen-help.xml @@ -893,7 +893,7 @@ c.1password.com Path - Specify the path to the library. + Specify the local or UNC path to the Evergreen Library. FileInfo @@ -903,12 +903,27 @@ c.1password.com None + + Get-EvergreenLibrary + + Uri + + Specify the URI to an Evergreen Library hosted on blob storage on an Azure storage account. + + Uri + + Uri + + + None + + Path - Specify the path to the library. + Specify the local or UNC path to the Evergreen Library. FileInfo @@ -917,6 +932,18 @@ c.1password.com None + + Uri + + Specify the URI to an Evergreen Library hosted on blob storage on an Azure storage account. + + Uri + + Uri + + + None + @@ -953,6 +980,13 @@ c.1password.com Returns details about the Evergreen library at \server\EvergreenLibrary, including application version information stored for each application. + + -------------------------- Example 2 -------------------------- + PS C:\> Get-EvergreenLibrary -Uri "https://st5srpuzr5v74.blob.core.windows.net/library/EvergreenLibrary.json" + + Returns details about the Evergreen library at on the storage account - "st5srpuzr5v74" under the container "library", including application version information stored for each application. + + diff --git a/docs/changelog.md b/docs/changelog.md index 639c69a9..7e446efb 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,14 @@ # Change log +## VERSION + +* Adds `OBSStudioAlt` - provides an alternative method for returning OSB Studio downloads +* Renames function `Get-EvergreenLibraryApp` to `Get-EvergreenAppFromLibrary`. `Get-EvergreenLibraryApp` remains as the alias +* Updates `Get-EvergreenLibrary` to return details from an Evergreen Library hosted on a `https` URL (e.g. an Azure storage account) +* Updates `Start-EvergreenLibraryUpdate` to support an application in the library without a filter +* Updates internal function `Get-AdoptiumTemurin` to ensure `jdk-` text is not returned in the version number +* Updates filter in the default Evergreen Library template - `EvergreenLibraryTemplate.json` + ## 2407.1230 * Updates `ScooterBeyondCompare` with additional languages diff --git a/docs/help/en-US/Get-EvergreenLibrary.md b/docs/help/en-US/Get-EvergreenLibrary.md index 9fea4159..43e07966 100644 --- a/docs/help/en-US/Get-EvergreenLibrary.md +++ b/docs/help/en-US/Get-EvergreenLibrary.md @@ -13,33 +13,48 @@ Returns details about an Evergreen library including details about the applicati ## SYNTAX +### Path + ``` -Get-EvergreenLibrary [-Path] [] +Get-EvergreenLibrary [-Path] [-ProgressAction ] [] ``` -## DESCRIPTION +### URI + +``` +Get-EvergreenLibrary -Uri [-ProgressAction ] [] +``` -Returns details about an Evergreen library at a specified path. This will include details of the library stored in `EvergreenLibrary.json` and application version information stored for each application in the library. Application downloads and application version information must first be downloaded via `Invoke-EvergreenLibraryUpdate`. +## DESCRIPTION +Returns details about an Evergreen library at a specified path. +This will include details of the library stored in `EvergreenLibrary.json` and application version information stored for each application in the library. +Application downloads and application version information must first be downloaded via `Invoke-EvergreenLibraryUpdate`. ## EXAMPLES ### Example 1 - -```powershell +``` PS C:\> Get-EvergreenLibrary -Path "\\server\EvergreenLibrary" ``` Returns details about the Evergreen library at \\server\EvergreenLibrary, including application version information stored for each application. +### Example 2 +``` +PS C:\> Get-EvergreenLibrary -Uri "https://st5srpuzr5v74.blob.core.windows.net/library/EvergreenLibrary.json" +``` + +Returns details about the Evergreen library at on the storage account - "st5srpuzr5v74" under the container "library", including application version information stored for each application. + ## PARAMETERS ### -Path -Specify the path to the library. +Specify the local or UNC path to the Evergreen Library. ```yaml Type: FileInfo -Parameter Sets: (All) +Parameter Sets: Path Aliases: Required: True @@ -49,6 +64,22 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -Uri + +Specify the URI to an Evergreen Library hosted on blob storage on an Azure storage account. + +```yaml +Type: Uri +Parameter Sets: URI +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). From 48b5a7efed4d253e7c486ca63e212e0fcb4efa24 Mon Sep 17 00:00:00 2001 From: Kirill Trofimov Date: Mon, 29 Jul 2024 12:27:29 +0200 Subject: [PATCH 09/11] Evergreen/Manifests/MicrosoftTerminal.json: extend MatchFileTypes (to follow current and possible feature extensions) --- Evergreen/Manifests/MicrosoftTerminal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Manifests/MicrosoftTerminal.json b/Evergreen/Manifests/MicrosoftTerminal.json index 1f7ee861..0ad6bf2a 100644 --- a/Evergreen/Manifests/MicrosoftTerminal.json +++ b/Evergreen/Manifests/MicrosoftTerminal.json @@ -4,7 +4,7 @@ "Get": { "Uri": "https://api.github.com/repos/microsoft/terminal/releases/latest", "MatchVersion": "(\\d+(\\.\\d+){1,4}).*", - "MatchFileTypes": "\\.msixbundle$" + "MatchFileTypes": "\\.exe$|\\.msi$|\\.msixbundle$|\\.zip$" }, "Install": { "Setup": "", From b36982802033a3a237a4d42ba257f1678cca62d2 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Tue, 30 Jul 2024 08:39:13 +1000 Subject: [PATCH 10/11] Update Get-EvergreenLibrary.ps1 Allow EvergreenLibrary.json or Library.json --- Evergreen/Public/Get-EvergreenLibrary.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Evergreen/Public/Get-EvergreenLibrary.ps1 b/Evergreen/Public/Get-EvergreenLibrary.ps1 index 0b079187..df1de619 100644 --- a/Evergreen/Public/Get-EvergreenLibrary.ps1 +++ b/Evergreen/Public/Get-EvergreenLibrary.ps1 @@ -21,7 +21,7 @@ function Get-EvergreenLibrary { ParameterSetName = "URI")] [ValidateNotNullOrEmpty()] [ValidateScript( { - if ($_ -match "^(https:\/\/([a-zA-Z0-9_\-\.]+)\/([a-zA-Z0-9_-]+)\/EvergreenLibrary.json)$") { + if ($_ -match "^(https:\/\/([a-zA-Z0-9_\-\.]+)\/([a-zA-Z0-9_-]+)\/(EvergreenLibrary.json|Library.json))$") { $true } else { From d76b239ecb5158ee0b92e7230ee720e12d88aaa3 Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Tue, 30 Jul 2024 08:39:26 +1000 Subject: [PATCH 11/11] Add verbose output --- Evergreen/Public/Export-EvergreenApp.ps1 | 2 ++ Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Evergreen/Public/Export-EvergreenApp.ps1 b/Evergreen/Public/Export-EvergreenApp.ps1 index 4940aec4..132355ff 100644 --- a/Evergreen/Public/Export-EvergreenApp.ps1 +++ b/Evergreen/Public/Export-EvergreenApp.ps1 @@ -43,10 +43,12 @@ function Export-EvergreenApp { } # Sort the content and keep unique versions + Write-Verbose -Message "$($MyInvocation.MyCommand): Input object count: $($InputObject.Count)" $Properties = $InputObject | Get-Member | ` Where-Object { $_.MemberType -eq "NoteProperty" } | Select-Object -ExpandProperty "Name" -Unique | ` Sort-Object -Descending $OutputObject = $InputObject | Select-Object -Unique -Property $Properties + Write-Verbose -Message "$($MyInvocation.MyCommand): Output object count: $($OutputObject.Count)" # Export the data to file $OutputObject | Sort-Object -Property @{ Expression = { [System.Version] $_.Version }; Descending = $false } -ErrorAction "SilentlyContinue" | ` diff --git a/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 b/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 index 87d6e777..eaab5545 100644 --- a/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 +++ b/Evergreen/Public/Start-EvergreenLibraryUpdate.ps1 @@ -64,7 +64,7 @@ function Start-EvergreenLibraryUpdate { # If something returned, add to the library if ($null -ne $App) { - Write-Verbose -Message "$($MyInvocation.MyCommand): Download count for $($Application.EvergreenApp): $($App.Count)." + Write-Verbose -Message "$($MyInvocation.MyCommand): Download count for $($Application.EvergreenApp): $($App.Count)." # Save the installers to the library if ($PSCmdlet.ShouldProcess("Downloading $($App.Count) application installers.", "Save-EvergreenApp")) { @@ -75,12 +75,12 @@ function Start-EvergreenLibraryUpdate { if ($Saved.Count -gt 1) { for ($i = 0; $i -lt $App.Count; $i++) { $Item = $Saved | Where-Object { $_.FullName -match $App[$i].Version -and ((Split-Path $_.FullName -Leaf) -eq (Split-Path $App[$i].URI -Leaf)) } - Write-Verbose -Message "$($MyInvocation.MyCommand): Add path to object: $($Item.FullName)" + Write-Verbose -Message "$($MyInvocation.MyCommand): Add path to object: $($Item.FullName)" $App[$i] | Add-Member -MemberType "NoteProperty" -Name "Path" -Value $Item.FullName } } else { - Write-Verbose -Message "$($MyInvocation.MyCommand): Add path to object: $($Saved.FullName)" + Write-Verbose -Message "$($MyInvocation.MyCommand): Add path to object: $($Saved.FullName)" $App | Add-Member -MemberType "NoteProperty" -Name "Path" -Value $Saved.FullName }