1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

Start getting tag list

This commit is contained in:
peteGSX 2023-04-06 05:31:11 +10:00
parent d2c7e7fb8d
commit 72ceb63913

View File

@ -120,6 +120,31 @@ if (!(Test-Path -PathType Leaf -Path $arduinoCLI)) {
}
}
<#
Get the list of tags
#>
try {
$tagList = Invoke-RestMethod -Uri $gitHubAPITags
}
catch {
Write-Output "Failed to obtain list of available EX-CommandStation versions"
Exit
}
<#
Get latest two Prod and Devel releases, add to hash table for selection by user
#>
foreach ($tag in $tagList | Sort-Object -Property ref -Descending) {
if ($tag.ref -Like "*Prod") {
Write-Output $tag.ref
}
}
foreach ($tag in $tagList | Sort-Object -Property ref -Descending) {
if ($tag.ref -Like "*Devel") {
Write-Output $tag.ref
}
}
<#
Write-Output "Installing using directory $buildDirectory"