feat: build infrastructure

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-24 11:51:44 +02:00
parent 213b3fc652
commit b4c995049f
13 changed files with 416 additions and 10 deletions

View File

@@ -0,0 +1,31 @@
@echo off
setlocal enabledelayedexpansion
set ROOT_DIR=%~dp0\..\..
pushd "%ROOT_DIR%"
set PLATFORM=%1
if "%PLATFORM%"=="" set PLATFORM=windows
call mix deps.get
if errorlevel 1 goto :error
if not "%BDS_SKIP_TESTS%"=="1" (
call mix test
if errorlevel 1 goto :error
)
call set MIX_ENV=prod
call mix release --overwrite bds
if errorlevel 1 goto :error
call mix release --overwrite bds_mcp
if errorlevel 1 goto :error
call mix bds.package %PLATFORM%
if errorlevel 1 goto :error
popd
exit /b 0
:error
popd
exit /b 1

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")/../.." && pwd)
PLATFORM=${1:-}
if [[ -z "$PLATFORM" ]]; then
case "$(uname -s)" in
Darwin) PLATFORM="macos" ;;
Linux) PLATFORM="linux" ;;
*)
echo "Unsupported platform. Pass one of: macos, linux, windows" >&2
exit 1
;;
esac
fi
cd "$ROOT_DIR"
mix deps.get
if [[ "${BDS_SKIP_TESTS:-0}" != "1" ]]; then
mix test
fi
MIX_ENV=prod mix release --overwrite bds
MIX_ENV=prod mix release --overwrite bds_mcp
MIX_ENV=prod mix bds.package "$PLATFORM"