Build grafana on stable release

Hi guys

I build my own grafana with the steps on this site: https://grafana.com/docs/project/building_from_source/

It runs nearly everything good, but yesterday I tried to genereate a package and there I get an error about a file I never touched. After this I release that the command go get GitHub.com/grafana/grafana downloads the newest pre-lease of grafana. But I don’t want to build my grafana on a pre-release. May be the the pre-release version is the reason for the error during the package generation. Is it possible to download with go get the latest stable release of grafana?

you need to checkout the latest stable branch

Thank you for the fast question.
And how can I do this with go get ?

When I check out the repository with:
git clone https://github.com/grafana/grafana.git --branch v6.2.x

My desired version will be download

But then when I start ‘go run build.go setup’ I receive an error with exit status 2 and exit status 1 with following errors: …adaptor_go1_13:.go:16:14: undefinded: errors.Frame and format_go1_13:go:12:18: undefined: errors.Formatter

go run build.go build fails then with the same error:

How can I solve this?

I solved the problem with the command
go get -u golang.org/x/xerrors