-
-
Notifications
You must be signed in to change notification settings - Fork 66
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 #774 from aaronparker/apps
Apps
- Loading branch information
Showing
10 changed files
with
133 additions
and
23 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,31 @@ | ||
function Get-AWSSMP { | ||
<# | ||
.SYNOPSIS | ||
Get the current versions and download URLs for AWS Session Manager Plugin | ||
.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]) | ||
) | ||
|
||
# Get the latest version of AWS Session Manager Plugin via the latest tag on the repository | ||
$Tags = Get-GitHubRepoTag -Uri $res.Get.Update.Uri | ||
|
||
# Select the latest version | ||
$Version = $Tags | Sort-Object -Property @{ Expression = { [System.Version]$_.Tag }; Descending = $true } | Select-Object -First 1 | ||
|
||
# Output the version and download URL | ||
$PSObject = [PSCustomObject] @{ | ||
Version = $Version.Tag | ||
Type = "exe" | ||
URI = $res.Get.Download.Uri -replace $res.Get.Download.ReplaceText, $Version.Tag | ||
} | ||
Write-Output -InputObject $PSObject | ||
} |
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,39 @@ | ||
function Get-AutoIt { | ||
<# | ||
.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 | ||
$Updates = ConvertFrom-IniFile -InputObject $UpdateFeed | ||
foreach ($Key in $Updates.Keys) { | ||
|
||
# Output the latest version | ||
[PSCustomObject]@{ | ||
Version = $Updates[$Key].version | ||
Date = ConvertTo-DateTime -DateTime $Updates[$Key].filetime -Pattern "yyyyMMddHHmmss" | ||
Channel = $(if ($Key -match "Beta$") { "Beta" } else { "Stable" }) | ||
Size = $Updates[$Key].filesize | ||
Type = Get-FileType -File $Updates[$Key].setup | ||
URI = $Updates[$Key].setup | ||
} | 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
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": "AWS Session Manager Plugin", | ||
"Source": "https://github.com/aws/session-manager-plugin", | ||
"Get": { | ||
"Update": { | ||
"Uri": "https://api.github.com/repos/aws/session-manager-plugin/tags", | ||
"ContentType": "application/json; charset=utf-8" | ||
}, | ||
"Download": { | ||
"Uri" :"https://s3.amazonaws.com/session-manager-downloads/plugin/#version/windows/SessionManagerPluginSetup.exe", | ||
"ReplaceText": "#version" | ||
} | ||
}, | ||
"Install": { | ||
"Setup": "SessionManagerPluginSetup.exe", | ||
"Physical": { | ||
"Arguments": "/quiet /norestart", | ||
"PostInstall": [] | ||
}, | ||
"Virtual": { | ||
"Arguments": "/quiet /norestart", | ||
"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": "AutoIt Scripting Language", | ||
"Source": "https://www.autoitscript.com/site/autoit/", | ||
"Get": { | ||
"Update": { | ||
"Uri": "https://www.autoitscript.com/autoit3/files/beta/update.dat", | ||
"ContentType": "text/plain; charset=utf-8", | ||
"UserAgent": "AutoIt" | ||
}, | ||
"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