#!/usr/bin/env bash
# Builds the five release binaries into dist/: stdlib only, offline, cgo off.
set -euo pipefail
cd "$(dirname "$0")/.."
mkdir -p dist
for target in darwin/arm64 darwin/amd64 linux/amd64 linux/arm64 windows/amd64; do
  os=${target%/*}
  arch=${target#*/}
  ext=""
  if [ "$os" = windows ]; then ext=.exe; fi
  name="dist/minutes-$os-$arch$ext"
  CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOPROXY=off go build -trimpath -ldflags='-s -w' -o "$name" .
  echo "$name"
done
