Last active
August 29, 2015 14:11
-
-
Save rastasheep/49d7916bd71bb18764cb to your computer and use it in GitHub Desktop.
Install and setup Go project on Semaphore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=$1 | |
OWNER=$2 | |
wget "https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz" | |
sudo tar -C "/usr/local -xzf go$VERSION.linux-amd64.tar.gz" | |
sudo ln -s /usr/local/go/bin/go /usr/local/bin/ | |
sudo apt-get install -y mercurial | |
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bash_profile | |
mkdir -p /home/runner/workspace/src /home/runner/workspace/bin /home/runner/workspace/pkg | |
echo "export GOPATH=/home/runner/workspace" >> /home/runner/.bash_profile | |
echo "export PATH=$PATH:/home/runner/workspace/bin" >> /home/runner/.bash_profile | |
mkdir -p /home/runner/workspace/src/github.com/$OWNER | |
cd $GOPATH/src/github.com/$OWNER | |
ln -s /home/runner/$SEMAPHORE_PROJECT_NAME /home/runner/workspace/src/github.com/$OWNER/ | |
cd /home/runner/workspace/src/github.com/$OWNER/$SEMAPHORE_PROJECT_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment