Don't use runtime.Version() to find the current go version

That will be the go version at compile time. So read $GOROOT/VERSION, or
fall back to executing `$GOROOT/bin/go version` to find the go version
currently in GOROOT.

Test: Ensure everything rebuilds when switching between go1.8rc2 and go1.8
Change-Id: I8738a7aa249a088b1e0668af260fa3974844dab7
This commit is contained in:
Dan Willemsen
2017-02-22 22:03:04 -08:00
parent fd96d2421a
commit fde8534680
2 changed files with 16 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ function run_go
{
# Increment when microfactory changes enough that it cannot rebuild itself.
# For example, if we use a new command line argument that doesn't work on older versions.
local mf_version=1
local mf_version=2
local mf_src="${TOP}/build/soong/cmd/microfactory"