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