Skip to content
Draft
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bin/deploy_to_balena.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ print_help() {
echo "Usage: deploy_to_balena.sh [options]"
echo "Options:"
echo " -h, --help show this help message and exit"
echo " -b, --board BOARD specify the board to build for (pi1, pi2, pi3, pi4, pi5)"
echo " -b, --board BOARD specify the board to build for (pi1, pi2, pi3, pi4, pi5, x86)"
echo " -f, --fleet FLEET specify the fleet name to deploy to"
echo " -s, --short-hash HASH specify the short hash to use for the image tag"
echo " -d, --dev run in dev mode"
Expand All @@ -23,7 +23,7 @@ while [[ $# -gt 0 ]]; do
-b|--board)
export BOARD="$2"

if [[ $BOARD =~ ^(pi1|pi2|pi3|pi4|pi5)$ ]]; then
if [[ $BOARD =~ ^(pi1|pi2|pi3|pi4|pi5|x86)$ ]]; then
echo "Building for $BOARD"
else
echo "Invalid board $BOARD"
Expand Down Expand Up @@ -91,7 +91,7 @@ function prepare_balena_file() {
cat docker-compose.balena.yml.tmpl | \
envsubst > balena-deploy/docker-compose.yml

if [[ "$BOARD" == "pi5" ]]; then
if [[ $BOARD =~ ^(pi5|x86)$ ]]; then
sed -i '/devices:/ {N; /\n.*\/dev\/vchiq:\/dev\/vchiq/d}' \
balena-deploy/docker-compose.yml
fi
Expand All @@ -118,7 +118,7 @@ else
cat docker-compose.balena.dev.yml.tmpl | \
envsubst > docker-compose.yml

if [[ "$BOARD" == "pi5" ]]; then
if [[ $BOARD =~ ^(pi5|x86)$ ]]; then
sed -i '/devices:/ {N; /\n.*\/dev\/vchiq:\/dev\/vchiq/d}' \
docker-compose.yml
fi
Expand Down