#!/usr/bin/env bash
set -euo pipefail

root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
out="$root/.build"
mkdir -p "$out"

(cd "$root/services/api" && go build -o "$out/alt-api" ./cmd/alt-api)
(cd "$root/services/worker" && go build -o "$out/alt-worker" ./cmd/alt-worker)
(cd "$root/apps/cli" && go build -o "$out/alt" ./cmd/alt)
(cd "$root/apps/client" && flutter build web)
