#!/bin/sh
# script/build: compile every package. dcf is a library, so this checks
# that it compiles and writes no binary. It needs the Go that
# script/bootstrap installs, and the final stage of the Dockerfile runs
# it too.
set -eu

ROOT="$(cd "$(dirname "$0")/.." && pwd -P)"

# Where script/bootstrap installs Go; it cannot put it on our PATH.
PATH="$HOME/.local/go/bin:$PATH"

main() {
    cd "$ROOT"
    CGO_ENABLED=0 go build ./...
}

main "$@"
