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