update get-new-tool-version.ps1

v-nibyko/get-go-versions
Nikita Bykov 3 years ago
parent b01e7843b6
commit 97e0e3a660

@ -29,7 +29,11 @@ if ($ToolName -eq "Xamarin") {
if ($VersionsToBuild) {
$availableVersions = $VersionsToBuild -join $joinChars
Write-Host "The following versions are available to build:`n${availableVersions}"
if ($ToolName -eq "Go") {
Write-Host "::set-output name=version_number::${availableVersions}"
} else {
Write-Host "##vso[task.setvariable variable=TOOL_VERSIONS;isOutput=true]${availableVersions}"
}
} else {
Write-Host "There aren't versions to build"
}

@ -2,7 +2,7 @@ using module "./base-parser.psm1"
class GoVersionsParser: BaseVersionsParser {
[SemVer[]] GetUploadedVersions() {
$url = $this.BuildGitHubFileUrl("nikita-bykov", "go-versions", "move-get-go-version", "versions-manifest.json")
$url = $this.BuildGitHubFileUrl("actions", "go-versions", "main", "versions-manifest.json")
$releases = Invoke-RestMethod $url -MaximumRetryCount $this.ApiRetryCount -RetryIntervalSec $this.ApiRetryIntervalSeconds
return $releases.version
}

Loading…
Cancel
Save