Skip to content

Commit 649ec79

Browse files
authored
Merge pull request #130 from EUCPilots/Updates
Update scripts and manifests for improved functionality and accuracy
2 parents e871fb5 + c22d8ac commit 649ec79

6 files changed

Lines changed: 17 additions & 35 deletions

Apps/Get-AdvancedInstaller.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ function Get-AdvancedInstaller {
1818
Uri = $res.Get.Update.Uri
1919
UserAgent = $res.Get.Update.UserAgent
2020
}
21-
$UpdateFeed = Invoke-EvergreenRestMethod @params
22-
if ($null -ne $UpdateFeed) {
23-
21+
$response = Invoke-EvergreenWebRequest @params
22+
if ($null -ne $response) {
23+
2424
# Convert the INI update feed to an object, replace strings that break conversion
25+
$UpdateFeed = [System.Text.Encoding]::Unicode.GetString($response)
2526
$Updates = ConvertFrom-IniFile -InputObject ($UpdateFeed -replace ";aiu;", "" -replace "\[advinst", "[")
2627

2728
# Get the latest version

Apps/Get-jrsoftwareInnoSetup.ps1

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ function Get-jrsoftwareInnoSetup {
55
66
.NOTES
77
Author: Andrew Cooper
8-
Twitter: @adotcoop
9-
based on Get-TelerikFiddlerEverywhere.ps1
108
#>
119
[OutputType([System.Management.Automation.PSObject])]
1210
[CmdletBinding(SupportsShouldProcess = $false)]
@@ -17,24 +15,12 @@ function Get-jrsoftwareInnoSetup {
1715
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1])
1816
)
1917

20-
# Get the latest download
21-
$Response = Resolve-SystemNetWebRequest -Uri $res.Get.Download.Uri
22-
23-
if ($null -ne $Response) {
24-
25-
# Extract the version information from the uri
26-
try {
27-
$Version = [RegEx]::Match($Response.ResponseUri.LocalPath, $res.Get.Download.MatchVersion).Captures.Groups[1].Value
28-
}
29-
catch {
30-
throw "$($MyInvocation.MyCommand): Failed to extract the version information from the uri."
31-
}
32-
33-
# Construct the output; Return the custom object to the pipeline
34-
$PSObject = [PSCustomObject] @{
35-
Version = $Version
36-
URI = $Response.ResponseUri.AbsoluteUri
37-
}
38-
Write-Output -InputObject $PSObject
18+
# Pass the repo releases API URL and return a formatted object
19+
$params = @{
20+
Uri = $res.Get.Uri
21+
MatchVersion = $res.Get.MatchVersion
22+
Filter = $res.Get.MatchFileTypes
3923
}
24+
$object = Get-GitHubRepoRelease @params
25+
Write-Output -InputObject $object
4026
}

Manifests/ESETPROTECTServer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Name": "ESET Endpoint Antivirus",
2+
"Name": "ESET PROTECT Server",
33
"Source": "https://www.eset.com/au/business/solutions/endpoint-protection/",
44
"Get": {
55
"Update": {

Manifests/MicrosoftTeams.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Name": "Microsoft Teams (new)",
2+
"Name": "Microsoft Teams",
33
"Source": "https://www.microsoft.com/teams",
44
"Get": {
55
"Update": {

Manifests/PritunlOpenVPNClient.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Name": "Pritunl OpenVPN Client",
33
"Source": "https://client.pritunl.com/",
44
"Get": {
5-
"Uri": "https://api.github.com/repos/pritunl/pritunl-client-electron/releases/latest",
5+
"Uri": "https://api.github.com/repos/pritunl/pritunl-client/releases/latest",
66
"MatchVersion": "(\\d+(\\.\\d+){1,4}).*",
77
"MatchFileTypes": "\\.exe$|\\.msi$"
88
}

Manifests/jrsoftwareInnoSetup.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
"Name": "jrsoftware InnoSetup",
33
"Source": "https://www.innosetup.com",
44
"Get": {
5-
"Update": {
6-
"Uri": ""
7-
},
8-
"Download": {
9-
"Uri": "https://jrsoftware.org/download.php/is.exe",
10-
"Property": "ResponseUri.Headers.Location",
11-
"MatchVersion": "(\\d+(\\.\\d+){1,3})"
12-
}
5+
"Uri": "https://api.github.com/repos/jrsoftware/issrc/releases/latest",
6+
"MatchVersion": "(\\d+(\\.\\d+){1,4}).*",
7+
"MatchFileTypes": "\\.exe$|\\.msi$"
138
},
149
"Install": {
1510
"Setup": "innosetup*.exe",

0 commit comments

Comments
 (0)