forked from bots-garden/ori
| ✨ Workspace panel, selectors, previews, desktop app, sandbox template, resizable file tree, light/dark theme | 1 | #!/usr/bin/env bash |
| 2 | # Builds the ori sandbox template image for amd64+arm64 and pushes it to | |
| 3 | # Docker Hub as k33g/ori:<version> and k33g/ori:latest. | |
| 4 | # | |
| 5 | # Usage: | |
| 6 | # ./template/build.sh # version 0.0.0 | |
| 7 | # ./template/build.sh 0.1.0 # another version | |
| 8 | # PLATFORMS=linux/arm64 ./template/build.sh # single-arch build | |
| 9 | # | |
| 10 | # Requires: docker login (hub account k33g), and a buildx builder able to do | |
| 11 | # multi-platform builds. If the default builder refuses, create one with: | |
| 12 | # docker buildx create --name ori-builder --driver docker-container --use | |
| 13 | set -euo pipefail | |
| 14 | ||
| ✨ Switch the ACP adapter to @agentclientprotocol/claude-agent-acp (template 0.0.2) | 15 | VERSION="${1:-0.0.2}" |
| ✨ Workspace panel, selectors, previews, desktop app, sandbox template, resizable file tree, light/dark theme | 16 | IMAGE="k33g/ori" |
| 17 | PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64}" | |
| 18 | ||
| 19 | SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | |
| 20 | CONTEXT="${SCRIPT_DIR}/.." | |
| 21 | ||
| 22 | echo "Building ${IMAGE}:${VERSION} (+latest) for ${PLATFORMS} and pushing to Docker Hub…" | |
| 23 | docker buildx build \ | |
| 24 | --platform "${PLATFORMS}" \ | |
| 25 | --file "${SCRIPT_DIR}/Dockerfile" \ | |
| 26 | --tag "${IMAGE}:${VERSION}" \ | |
| 27 | --tag "${IMAGE}:latest" \ | |
| 28 | --push \ | |
| 29 | "${CONTEXT}" | |
| 30 | ||
| 31 | echo "Done: ${IMAGE}:${VERSION} and ${IMAGE}:latest pushed." |