-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #736 from aaronparker/apps
Apps
- Loading branch information
Showing
13 changed files
with
199 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
function Get-AWSAppStreamClient { | ||
<# | ||
.NOTES | ||
Site: https://stealthpuppy.com | ||
Author: Aaron Parker | ||
Twitter: @stealthpuppy | ||
#> | ||
[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 the update feed from RSS | ||
$UpdateFeed = Invoke-EvergreenRestMethod -Uri $res.Get.Update.Uri | ||
|
||
# Get the latest version from the feed | ||
$LatestItem = $UpdateFeed | Where-Object { $_.title -match $res.Get.Update.MatchText } | Select-Object -First 1 | ||
$LatestVersion = [RegEx]::Match(($LatestItem | Select-Object -ExpandProperty "description"), $res.Get.Update.MatchVersion).Captures.Groups[1].Value | ||
|
||
[PSCustomObject]@{ | ||
Version = $LatestVersion | ||
Date = $LatestItem.pubDate | ||
Type = Get-FileType -File $res.Get.Download.Uri | ||
URI = $res.Get.Download.Uri -replace $res.Get.Download.ReplaceText, $LatestVersion | ||
} | Write-Output | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Function Get-AdvancedInstaller { | ||
<# | ||
.NOTES | ||
Author: Aaron Parker | ||
Twitter: @stealthpuppy | ||
#> | ||
[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 the update feed | ||
$params = @{ | ||
Uri = $res.Get.Update.Uri | ||
UserAgent = $res.Get.Update.UserAgent | ||
} | ||
$UpdateFeed = Invoke-EvergreenRestMethod @params | ||
if ($null -ne $UpdateFeed) { | ||
|
||
# Convert the INI update feed to an object, replace strings that break conversion | ||
$Updates = ConvertFrom-IniFile -InputObject ($UpdateFeed -replace ";aiu;", "" -replace "\[advinst", "[") | ||
|
||
# Get the latest version | ||
$LatestVersion = $Updates.Keys | ` | ||
Sort-Object -Property @{ Expression = { [System.Version]$_.Version }; Descending = $true } | ` | ||
Select-Object -First 1 | ||
$LatestUpdate = $Updates[$LatestVersion] | ||
|
||
# Output the latest version | ||
[PSCustomObject]@{ | ||
Version = $LatestVersion | ||
Size = $LatestUpdate.Size.Trim() | ||
Sha256 = $LatestUpdate.SHA256.Trim() | ||
Type = Get-FileType -File $LatestUpdate.URL | ||
URI = $LatestUpdate.URL.Trim() | ||
} | Write-Output | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"Name": "AWS AppStream 2.0 Client", | ||
"Source": "https://docs.aws.amazon.com/en_us/appstream2/latest/developerguide/client-release-versions.html", | ||
"Get": { | ||
"Update": { | ||
"Uri": "https://docs.aws.amazon.com/en_us/appstream2/latest/developerguide/doc-history.rss", | ||
"MatchVersion": "(\\d+(\\.\\d+){1,4}.*)", | ||
"MatchText": "New client version" | ||
}, | ||
"Download": { | ||
"Uri": "https://clients.amazonappstream.com/installers/windows/AmazonAppStreamClientSetup_#version.exe", | ||
"ReplaceText": "#version" | ||
} | ||
}, | ||
"Install": { | ||
"Setup": "", | ||
"Physical": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
}, | ||
"Virtual": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"Name": "Advanced Installer", | ||
"Source": "https://www.advancedinstaller.com", | ||
"Get": { | ||
"Update": { | ||
"Uri": "https://www.advancedinstaller.com/downloads/updates.ini", | ||
"ContentType": "text/plain; charset=utf-8", | ||
"UserAgent": "AdvancedInstaller" | ||
}, | ||
"Download": { | ||
"Uri": "" | ||
} | ||
}, | ||
"Install": { | ||
"Setup": "", | ||
"Physical": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
}, | ||
"Virtual": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters