Skip to content

Commit

Permalink
Merge pull request #702 from aaronparker/apps
Browse files Browse the repository at this point in the history
Apps
  • Loading branch information
aaronparker authored Jun 15, 2024
2 parents 38a1054 + 1fa447f commit 1dc78b9
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Evergreen/Apps/Get-GitHubRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Get-GitHubRelease {

[Parameter(Mandatory = $False, Position = 1)]
[ValidateScript( {
if ($_ -match "^(https://api\.github\.com/repos/)([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(/releases/latest)$") {
if ($_ -match "^(https://api\.github\.com/repos/)([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)(/releases)$") {
$True
}
else {
Expand Down
7 changes: 6 additions & 1 deletion Evergreen/Apps/Get-PDFArranger.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ Function Get-PDFArranger {
Filter = $res.Get.MatchFileTypes
}
$object = Get-GitHubRepoRelease @params
Write-Output -InputObject $object

# Filter the object to return the latest version with assets
Write-Verbose -Message "$($MyInvocation.MyCommand): Returned $($object.Count) releases"
$Latest = $object | Select-Object -First 1
Write-Verbose -Message "$($MyInvocation.MyCommand): Filter objects for latest version: $($Latest.Version)"
$object | Where-Object { $Latest.Version -eq $_.Version } | Write-Output
}
30 changes: 30 additions & 0 deletions Evergreen/Apps/Get-QGIS.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function Get-QGIS {
<#
.NOTES
Author: Aaron Parker
Twitter: @stealthpuppy
#>
[OutputType([System.Management.Automation.PSObject])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification="Product name ends in s")]
[CmdletBinding(SupportsShouldProcess = $false)]
param (
[Parameter(Mandatory = $false, Position = 0)]
[ValidateNotNull()]
[System.Management.Automation.PSObject]
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
)

# Get the update feed
$UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri

# Return an object for each channel
foreach ($Channel in $res.Get.Update.Channels) {
$Version = "$($UpdateFeed.$Channel.version)-$($UpdateFeed.$Channel.binary)"
[PSCustomObject]@{
Version = $Version
Channel = $Channel
Date = $UpdateFeed.$Channel.date
URI = $res.Get.Download.Uri -replace $res.Get.Download.ReplaceText, $Version
} | Write-Output
}
}
1 change: 1 addition & 0 deletions Evergreen/Apps/Get-SAGAGIS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Function Get-SAGAGIS {
Twitter: @adotcoop
#>
[OutputType([System.Management.Automation.PSObject])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseSingularNouns", "", Justification="Product name is a plural")]
[CmdletBinding(SupportsShouldProcess = $False)]
param (
[Parameter(Mandatory = $False, Position = 0)]
Expand Down
2 changes: 1 addition & 1 deletion Evergreen/Manifests/PDFArranger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Name": "PDF Arranger",
"Source": "https://github.com/pdfarranger/pdfarranger/",
"Get": {
"Uri": "https://api.github.com/repos/pdfarranger/pdfarranger/releases/latest",
"Uri": "https://api.github.com/repos/pdfarranger/pdfarranger/releases",
"MatchVersion": "(\\d+(\\.\\d+){1,4}).*",
"MatchFileTypes": "\\.exe$|\\.msi$"
},
Expand Down
29 changes: 29 additions & 0 deletions Evergreen/Manifests/QGIS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"Name": "QGIS",
"Source": "https://qgis.org/en/site/index.html",
"Get": {
"Update": {
"Uri": "https://version.qgis.org/version.json",
"Channels": [
"latest",
"ltr"
]
},
"Download": {
"Uri": "https://download.osgeo.org/qgis/windows/QGIS-OSGeo4W-#version.msi",
"ReplaceText": "#version"
}
},
"Install": {
"Setup": "",
"Preinstall": "",
"Physical": {
"Arguments": "/quiet /norestart",
"PostInstall": []
},
"Virtual": {
"Arguments": "/quiet /norestart",
"PostInstall": []
}
}
}

0 comments on commit 1dc78b9

Please sign in to comment.