diff --git a/apps/penpal/justfile b/apps/penpal/justfile index 58a14dec..4435388c 100644 --- a/apps/penpal/justfile +++ b/apps/penpal/justfile @@ -3,6 +3,15 @@ default: dev export PATH := env_var_or_default("CARGO_HOME", env_var("HOME") + "/.cargo") + "/bin:" + env_var("PATH") +# Check that Block's internal network is reachable (requires Warp to be connected) +_check-warp: + #!/usr/bin/env bash + if ! curl -sf --max-time 5 --head https://global.block-artifacts.com -o /dev/null 2>/dev/null; then + echo "Error: Block's internal network is unreachable." >&2 + echo "Turn on Warp before running this command." >&2 + exit 1 + fi + # Ensure required tools are installed ensure-deps: #!/usr/bin/env bash @@ -40,7 +49,7 @@ build-go: ensure-deps ./scripts/build-go.sh # Install Penpal: build dev-branded desktop app and copy to /Applications -install: ensure-deps build-go +install: _check-warp ensure-deps build-go #!/usr/bin/env bash set -euo pipefail