#!/bin/sh
#set -e
#set -x

# disable CGO for cross-compiling
export CGO_ENABLED=0

export now=$(TZ=Australia/Sydney date '+%Y%m%d-%H%M%S')
echo $now
echo "build commences"
go build -ldflags "-X main.sha1ver=`git rev-parse HEAD` -X main.buildTime=$now" -o api-tester .
echo "build complete"
sha256sum api-tester > api-tester_checksum.txt
ls -lah