rm -rf gh
mkdir gh
cd gh
export GOPATH=`pwd`
mkdir -p src/github.com/cli
git clone --depth 1 https://github.com/cli/cli src/github.com/cli/cli
( cd src/github.com/cli/cli
  go get -v -d ./...
)
cd ..
tar -c -f- --exclude .git gh | xz -9 >gh-`date '+%Y%m%d'`.tar.xz
rm -rf gh
