build-image
build-image copied to clipboard
Document .go-version and fix build script errors for non-semver .go-version
Currently as far as I can see, only Golang doesn't have a (public?) way to specify version to use.
An environment variable would be good enough I think.
Edit:
After making this issue, I found making .go-version with desired version would override it.
But this is not documented anywhere and has some issues.
ie. Attempting to set version to stable, which gimme - the underlying tool used here supports - results in a weird error because the script tries to be lazy and just uses the variable from file in the path rather than the one provided by gimme, which results in stable, 1.11.x, etc not being supported.
Hence I will keep this issue open, with hope for better documentation and fixes for the issues noted.
.go-version - stable
11:25:32 PM: Installing Go version stable
11:25:37 PM: unset GOOS;
11:25:37 PM: unset GOARCH;
11:25:37 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.11.1.linux.amd64';
11:25:37 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.11.1.linux.amd64/bin:${PATH}";
11:25:37 PM: go version >&2;
11:25:37 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.11.1.linux.amd64.env"
11:25:37 PM: /usr/local/bin/run-build-functions.sh: line 498: /opt/buildhome/.gimme_cache/env/gostable.linux.amd64.env: No such file or directory
11:25:37 PM: Installing missing commands
.go-version - 1.11.1
11:28:36 PM: Installing Go version 1.11.1
11:28:41 PM: unset GOOS;
11:28:41 PM: unset GOARCH;
11:28:41 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.11.1.linux.amd64';
11:28:41 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.11.1.linux.amd64/bin:${PATH}";
11:28:41 PM: go version >&2;
11:28:41 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.11.1.linux.amd64.env"
11:28:41 PM: go version go1.11.1 linux/amd64
11:28:41 PM: Installing missing commands