feat: build infrastructure
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
31
scripts/release/build_platform.bat
Normal file
31
scripts/release/build_platform.bat
Normal 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
|
||||
28
scripts/release/build_platform.sh
Executable file
28
scripts/release/build_platform.sh
Executable 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"
|
||||
Reference in New Issue
Block a user