loop.sh raw

   1  #!/bin/bash
   2  set -e
   3  cd /home/mleku/src/orly.dev
   4  
   5  # Compile all SW targets + app.
   6  for d in sw sw-relay sw-marmot sm3sh; do
   7      echo "compile: next/$d"
   8      (cd next/$d && tinyjs -o ../../app/smesh3 .)
   9  done
  10  
  11  # Deploy to local test server (if deploy nsec is configured).
  12  if [ -f ~/.config/smesh-deploy.env ]; then
  13      source ~/.config/smesh-deploy.env
  14      echo "deploy: smesh-deploy → http://smesh.test:8090"
  15      go run ./cmd/smesh-deploy --url http://smesh.test:8090 --nsec "$DEPLOY_NSEC"
  16      # Wait for SSE push + SW refresh.
  17      sleep 3
  18  else
  19      echo "skip deploy: no ~/.config/smesh-deploy.env"
  20  fi
  21  
  22  # Clear log before test.
  23  > /tmp/browser-debug.log
  24  
  25  # Run Playwright.
  26  echo "test: e2e.py"
  27  python3 test/e2e.py
  28