Skip to content

Instantly share code, notes, and snippets.

@stack72
Created February 7, 2018 00:26
Show Gist options
  • Save stack72/7edb28d4519f55e58eef4b702e8f5604 to your computer and use it in GitHub Desktop.
Save stack72/7edb28d4519f55e58eef4b702e8f5604 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo "##teamcity[buildNumber '%teamcity.agent.name%-go%VERSION%']"
cd /mnt/goroots
wget https://storage.googleapis.com/golang/go%BUILDVERSION%.linux-amd64.tar.gz
tar xzf go%BUILDVERSION%.linux-amd64.tar.gz
rm go%BUILDVERSION%.linux-amd64.tar.gz
git clone https://go.googlesource.com/go /mnt/goroots/go%VERSION%
cd /mnt/goroots/go%VERSION%
git fetch --all --tags
git checkout tags/go%VERSION%
cd src/
GOROOT_BOOTSTRAP=/mnt/goroots/go ./make.bash
rm -rf /mnt/goroots/go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment