#!/bin/sh
# script/cibuild: run the CI build. It builds both images: the frontend
# from Dockerfile and the backend from Dockerfile.backend. Each runs its
# half of the checks as build steps, so a successful cibuild implies the
# whole repo is green. This is the only build step the Gitea workflow
# runs.
set -eu

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

main() {
    cd "$ROOT"
    timeout 300 docker build .
    timeout 300 docker build -f Dockerfile.backend .
}

main "$@"
