mirror of
https://github.com/skoelle/m5stack-dashboard.git
synced 2026-09-17 16:50:23 +00:00
26 lines
618 B
Bash
Executable File
26 lines
618 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Local build-only test script for Linux/macOS.
|
|
# Compiles the project WITHOUT uploading to any device.
|
|
# Useful to quickly check "does it even compile" without touching the M5Stack.
|
|
#
|
|
# Usage:
|
|
# ./scripts/build.sh
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
VENV_DIR=".venv-platformio"
|
|
|
|
if [ ! -d "$VENV_DIR" ]; then
|
|
echo "Creating local virtualenv in $VENV_DIR ..."
|
|
python3 -m venv "$VENV_DIR"
|
|
"$VENV_DIR/bin/pip" install --upgrade pip
|
|
"$VENV_DIR/bin/pip" install platformio
|
|
fi
|
|
|
|
echo "Running build (no upload) ..."
|
|
"$VENV_DIR/bin/pio" run
|
|
|
|
echo "Build finished successfully."
|