Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
28 lines (23 sloc)
731 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 \ | |
-mod=vendor \ | |
-trimpath \ | |
-ldflags "-X main.gitVersion=$REVISION -X main.buildTime=$BUILDTIME" \ | |
-v && \ | |
(cd geodns-logs && go build -trimpath -mod=vendor -v -o ../dist/geodns-logs-$OS-$ARCH && cd ..) && \ | |
cd dist && \ | |
rm -f service service-logs && \ | |
ln -s ../service . && \ | |
ln -s ../service-logs . && \ | |
tar -cvhf geodns-$OS-$ARCH.tar \ | |
--exclude \*~ geodns-$OS-$ARCH \ | |
geodns-logs-$OS-$ARCH service service-logs |