- add batch-scoped reconcile_runs persistence and queries - route batch detail and reconcile writes through batch_id/host_id - refresh production boards with host-scope acceptance artifacts - include latest real-host acceptance evidence for self_service and subscription
24 lines
613 B
Bash
Executable File
24 lines
613 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
IMAGE_TAG="${IMAGE_TAG:-sub2api-cn-relay-manager:local}"
|
|
BINARY_PATH="${BINARY_PATH:-$ROOT_DIR/bin/sub2api-cn-relay-manager}"
|
|
|
|
mkdir -p "$(dirname "$BINARY_PATH")"
|
|
|
|
echo "[1/2] building linux binary -> $BINARY_PATH"
|
|
(
|
|
cd "$ROOT_DIR"
|
|
GOTOOLCHAIN=local CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
|
go build -trimpath -ldflags='-s -w' -o "$BINARY_PATH" ./cmd/server
|
|
)
|
|
|
|
echo "[2/2] building OCI image -> $IMAGE_TAG"
|
|
(
|
|
cd "$ROOT_DIR"
|
|
docker build -f Dockerfile.local -t "$IMAGE_TAG" .
|
|
)
|
|
|
|
echo "done: $IMAGE_TAG"
|