nexo/bin/build

25 lines
673 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if [ -f "$root/apps/client/pubspec.yaml" ]; then
if command -v flutter >/dev/null 2>&1; then
(cd "$root/apps/client" && flutter build web)
else
echo "skip apps/client: flutter not found"
fi
fi
if [ -f "$root/services/core/server/go.mod" ]; then
if [ "${NEXO_CORE_GO_BUILD:-0}" = "1" ]; then
if command -v go >/dev/null 2>&1; then
(cd "$root/services/core/server" && go build ./...)
else
echo "skip services/core/server: go not found"
fi
else
echo "skip services/core/server: set NEXO_CORE_GO_BUILD=1 to run the Go build"
fi
fi