mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
Got tag version and URL
This commit is contained in:
parent
3a3071f35b
commit
61db37c7ea
|
@ -20,10 +20,11 @@
|
||||||
# 32/64 bit Win installer
|
# 32/64 bit Win installer
|
||||||
# https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_32bit.zip
|
# https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_32bit.zip
|
||||||
# https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip
|
# https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip
|
||||||
|
#
|
||||||
|
# For script errors set ExecutionPolicy:
|
||||||
|
# Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass
|
||||||
|
|
||||||
$gitHubAPITags = "https://api.github.com/repos/DCC-EX/CommandStation-EX/git/refs/tags"
|
Param(
|
||||||
|
|
||||||
param(
|
|
||||||
[Parameter()]
|
[Parameter()]
|
||||||
[String]$buildDirectory
|
[String]$buildDirectory
|
||||||
)
|
)
|
||||||
|
@ -34,6 +35,8 @@ if (!$PSBoundParameters.ContainsKey('buildDirectory')) {
|
||||||
$buildDirectory = $env:TEMP + "\" + $buildDate
|
$buildDirectory = $env:TEMP + "\" + $buildDate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$gitHubAPITags = "https://api.github.com/repos/DCC-EX/CommandStation-EX/git/refs/tags"
|
||||||
|
|
||||||
if ((Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture -eq "64-bit") {
|
if ((Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture -eq "64-bit") {
|
||||||
$arduinoCLIURL = "https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip"
|
$arduinoCLIURL = "https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip"
|
||||||
$arduinoCLIZip = $env:TEMP + "\" + "arduino-cli_latest_Windows_64bit.zip"
|
$arduinoCLIZip = $env:TEMP + "\" + "arduino-cli_latest_Windows_64bit.zip"
|
||||||
|
@ -54,6 +57,12 @@ $ProgressPreference = "Continue"
|
||||||
|
|
||||||
Write-Output "Installing using directory $buildDirectory"
|
Write-Output "Installing using directory $buildDirectory"
|
||||||
|
|
||||||
foreach ($tag in Invoke-RestMethod -Uri $gitHubAPITags | Format-List -Property ref) {
|
$tagList = Invoke-RestMethod -Uri $gitHubAPITags
|
||||||
$tag.getType()
|
|
||||||
|
# Example zip: https://github.com/DCC-EX/CommandStation-EX/archive/refs/tags/v4.2.36-Devel.zip
|
||||||
|
|
||||||
|
foreach ($tag in $tagList) {
|
||||||
|
$version = $tag.ref.split("/")[2]
|
||||||
|
$versionURL = "https://github.com/DCC-EX/CommandStation-EX/archive/" + $tag.ref
|
||||||
|
Write-Output "$version : $versionURL"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user