Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 16 lines (13 sloc) 535 Bytes
#!/bin/sh
echo building
# git describe --always --tags --dirty --long)
REVISION=`git rev-parse --short=5 HEAD`
BUILDTIME=`TZ=UTC date "+%Y-%m-%dT%H:%MZ"`
echo $REVISION > REVISION
OS=`go env GOOS`
ARCH=`go env GOARCH`
go build -i -o geodns-$OS-$ARCH \
-ldflags "-X main.gitVersion=$REVISION -X main.buildTime=$BUILDTIME" \
-v && \
(cd geodns-influxdb && go build -i -v -o geodns-influxdb-$OS-$ARCH && cd ..) && \
tar cvf geodns-$OS-$ARCH.tar geodns-$OS-$ARCH geodns-influxdb/geodns-influxdb-$OS-$ARCH service service-influxdb