mirror of
https://github.com/actions/go-versions
synced 2024-11-10 07:32:38 +00:00
Update Go.Tests.ps1
This commit is contained in:
parent
fb117ec42a
commit
ba76e8ae2e
1 changed files with 1 additions and 5 deletions
|
@ -25,11 +25,7 @@ Describe "Go" {
|
||||||
|
|
||||||
It "version is correct" {
|
It "version is correct" {
|
||||||
[version]$Version = $env:VERSION
|
[version]$Version = $env:VERSION
|
||||||
$versionOutputRaw = Invoke-Expression -Command "go version"
|
$versionOutput = (Invoke-Expression -Command "go version") -split " " | Select-Object -Index 2 -replace "go", ""
|
||||||
|
|
||||||
# Extract the version number from the output
|
|
||||||
$versionOutput = ($versionOutputRaw -split " ")[2] -replace "go", ""
|
|
||||||
|
|
||||||
$finalVersion = $Version.ToString(3)
|
$finalVersion = $Version.ToString(3)
|
||||||
If ($Version.Build -eq "0"){
|
If ($Version.Build -eq "0"){
|
||||||
$finalVersion = $Version.ToString(2)
|
$finalVersion = $Version.ToString(2)
|
||||||
|
|
Loading…
Reference in a new issue