#!/bin/sh
rm -rf dgraph
mkdir dgraph
export GOPATH=`pwd`/dgraph
git clone --depth 1 https://github.com/dgraph-io/dgraph $GOPATH/src/github.com/dgraph-io/dgraph
#go get -v -d github.com/dgraph-io/dgraph/...
( cd $GOPATH/src/github.com/dgraph-io/dgraph
  # govendor sync
  go get -v -d ./...
)
tar cf - --exclude .git dgraph | xz -9 >dgraph-`date '+%Y%m%d'`.tar.xz
rm -rf dgraph
