Building Grafana from code

I’d like to find out if there is any documentation how we can build Grafana from code?
Where do download the code? Or historical version of the code?
What is the procedure to build Grafana from code?
Thanks.

Might this help?

Or this