Files
nip/bin/make_all
Brian Cunnie 1918154760
Some checks failed
Queries per Second shields.io badge / update-qps-gist (push) Has been cancelled
Nameservers / check-dns (push) Has been cancelled
CI Tests / build (push) Has been cancelled
5.0.0: 🐞: IPv4 regex, hex includes dashes
2025-08-30 19:55:41 -07:00

24 lines
671 B
Bash
Executable File

#!/bin/bash -x
#
# Build binaries for macOS, Windows, Linux, FreeBSD
#
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd $DIR/..
ldflags="-X xip/xip.VersionSemantic=5.0.0 \
-X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \
-X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)"
export GOOS GOARCH
# Bring in ARM64 for my AWS Graviton2 instance
for GOARCH in amd64 arm64; do
for GOOS in darwin linux freebsd; do
go build \
-ldflags="$ldflags" \
-o $DIR/sslip.io-dns-server-$GOOS-$GOARCH \
main.go &
done
GOOS=windows
go build -o $DIR/sslip.io-dns-server-$GOOS-$GOARCH.exe main.go &
done
wait