Skip to content

Instantly share code, notes, and snippets.

@rastasheep
Last active January 2, 2016 01:19
Show Gist options
  • Save rastasheep/8229870 to your computer and use it in GitHub Desktop.
Save rastasheep/8229870 to your computer and use it in GitHub Desktop.
Setup Golang environment on Semaphore.
#!/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
@rastasheep
Copy link
Author

Execute with:
source ~/golang_setup.sh 1.1.2 rastasheep;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment