Skip to content

Instantly share code, notes, and snippets.

@dustin
Created February 14, 2013 18:47
Show Gist options
  • Select an option

  • Save dustin/4955187 to your computer and use it in GitHub Desktop.

Select an option

Save dustin/4955187 to your computer and use it in GitHub Desktop.
cbugg build script
#!/bin/sh -e
export GOPATH=$HOME/go
export PATH=/bin:/usr/bin:/usr/local/bin:$HOME/go/bin:$HOME/prog/go/bin
cd $HOME/go/src/github.com/couchbaselabs/cbugg
git fetch origin
if git diff --name-only origin/master | fgrep -q .go
then
echo "There were changes in the go code, doing an up + build"
go get -u
go build
else
echo "No changes in the go code, just restarting."
git reset --hard origin/master
fi
git rev-parse HEAD > static/version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment