Skip to content

Commit

Permalink
Add AutoIt
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Nov 20, 2024
1 parent 58efe80 commit 4462a98
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Evergreen/Apps/Get-AutoIt.ps1
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
}
}
}
25 changes: 25 additions & 0 deletions Evergreen/Manifests/AutoIt.json
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": []
}
}
}

0 comments on commit 4462a98

Please sign in to comment.