12 lines
355 B
PowerShell
12 lines
355 B
PowerShell
[CmdletBinding()]param(
|
|
[Parameter(Mandatory)]
|
|
[string]$GitHubProject,
|
|
[string]$tag='latest'
|
|
)
|
|
|
|
Invoke-WebRequest https://github.com/$GitHubProject/releases/$tag -ErrorAction Stop |
|
|
Select-Object -ExpandProperty Links |
|
|
Where-Object title |
|
|
Where-Object href -match 'tree/[^/]+$' |
|
|
Select-Object -ExpandProperty title -First 1
|