Browse code

hack/make.ps1: remove the .0 suffix from go version

We would like to use a version with .0 suffix (like 1.11.0) in
Dockerfile, so that once a .1 version is out (like 1.11.1) we
won't accidentally switch to it.

Unfortunately it's not possible to use .0 suffix currently
as it breaks the check in make.ps1. This patch fixes that.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>

Kir Kolyshkin authored on 2018/09/07 03:30:20
Showing 1 changed files
... ...
@@ -130,7 +130,7 @@ Function Check-InContainer() {
130 130
 # outside of a container where it may be out of date with master.
131 131
 Function Verify-GoVersion() {
132 132
     Try {
133
-        $goVersionDockerfile=(Select-String -Path ".\Dockerfile" -Pattern "^FROM golang:").ToString().Split(" ")[1].SubString(7)
133
+        $goVersionDockerfile=(Select-String -Path ".\Dockerfile" -Pattern "^FROM golang:").ToString().Split(" ")[1].SubString(7) -replace '\.0$',''
134 134
         $goVersionInstalled=(go version).ToString().Split(" ")[2].SubString(2)
135 135
     }
136 136
     Catch [Exception] {