Skip to content

Commit

Permalink
Merge pull request #611 from g3rhard/WSL
Browse files Browse the repository at this point in the history
Add Microsoft WSL
  • Loading branch information
aaronparker authored Jan 13, 2024
2 parents a128a1a + 9f9c565 commit e90b76a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Evergreen/Apps/Get-MicrosoftWSL.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Function Get-MicrosoftWSL {
<#
.SYNOPSIS
Returns the available Microsoft WSL versions.
.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])
)

# Pass the repo releases API URL and return a formatted object
$params = @{
Uri = $res.Get.Uri
MatchVersion = $res.Get.MatchVersion
Filter = $res.Get.MatchFileTypes
}
$object = Get-GitHubRepoRelease @params
Write-Output -InputObject $object
}
23 changes: 23 additions & 0 deletions Evergreen/Manifests/MicrosoftWSL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Name": "Microsoft WSL",
"Source": "https://github.com/microsoft/wsl/",
"Get": {
"Uri": "https://api.github.com/repos/microsoft/wsl/releases/latest",
"MatchVersion": "(\\d+(\\.\\d+){1,4}).*",
"MatchFileTypes": "\\.msixbundle$|\\.msi$"
},
"Install": {
"Setup": "",
"Preinstall": "",
"Physical": {
"Arguments": "",
"PostInstall": [
]
},
"Virtual": {
"Arguments": "",
"PostInstall": [
]
}
}
}

0 comments on commit e90b76a

Please sign in to comment.