#!/bin/sh
rm -rf prometheus
mkdir prometheus
GOPATH=`pwd`/prometheus
export GOPATH
git clone --depth 1 https://github.com/prometheus/prometheus/ $GOPATH/src/github.com/prometheus/prometheus/
( cd $GOPATH/src/github.com/prometheus/prometheus/
  go get -v -d ./...
)
#go get -v -u -d honnef.co/go/tools/cmd/staticcheck/...
#go get -v -u -d github.com/prometheus/prometheus/...
#go get -v -u -d github.com/prometheus/promu/...
tar cvf - --exclude .git prometheus | xz -9 >prometheus-`date '+%Y%m%d'`.tar.xz
rm -rf prometheus
