#!/bin/sh
rm -rf metrictank
GOPATH=`pwd`/metrictank
export GOPATH
( mkdir -p $GOPATH/src/github.com/grafana
  cd $GOPATH/src/github.com/grafana
  git clone https://github.com/grafana/metrictank.git
  cd metrictank
  dep ensure
)
tar cvf - --exclude .git metrictank | xz -9 >metrictank-`date '+%Y%m%d'`.tar.xz
rm -rf metrictank
