Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 24 lines (18 sloc) 584 Bytes
#!/bin/sh
set -ex
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=${GOOS:-`go env GOOS`}
ARCH=${GOARCH:-`go env GOARCH`}
set -ex
go build -o dist/geodns-$OS-$ARCH \
-ldflags "-X main.gitVersion=$REVISION -X main.buildTime=$BUILDTIME" \
-v && \
(cd geodns-logs && go build -v -o ../dist/geodns-logs-$OS-$ARCH && cd ..) && \
cd dist && \
tar -cvHf geodns-$OS-$ARCH.tar \
--exclude \*~ geodns-$OS-$ARCH \
geodns-logs-$OS-$ARCH service service-logs
You can’t perform that action at this time.