Last active
January 2, 2016 01:19
-
-
Save rastasheep/8229870 to your computer and use it in GitHub Desktop.
Setup Golang environment 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
#!/bin/bash | |
curl -L https://raw.github.com/rastasheep/gobrew/master/tools/install.sh | sh; source ~/.bash_profile | |
mkdir -p /tmp/$SEMAPHORE_PROJECT_NAME; mv $HOME/$SEMAPHORE_PROJECT_NAME/* /tmp/$SEMAPHORE_PROJECT_NAME | |
gobrew install $1; gobrew use $1 | |
mkdir -p "$HOME/go/{src,pkg,bin}"; cd $HOME/go | |
gobrew workspace set || true | |
mkdir -p "$HOME/go/src/github.com/$2"; cd $_; mv /tmp/$SEMAPHORE_PROJECT_NAME .; cd $SEMAPHORE_PROJECT_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute with:
source ~/golang_setup.sh 1.1.2 rastasheep;