#!/bin/sh -x
rm -rf git-town
GOPATH="`pwd`/git-town"
export GOPATH
mkdir -p $GOPATH
( cd $GOPATH
  git clone --depth 1 https://github.com/Originate/git-town $GOPATH/src/github.com/Originate/git-town
  # go get -v -d github.com/Originate/git-town
  ( cd src/github.com/Originate/git-town
    # glide install
    go get -v -d
  )
)
tar cvf - --exclude .git git-town | xz -9 >git-town-`date '+%Y%m%d'`.tar.xz
rm -rf git-town
