build.sh 657 B

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env bash
  2. set -e
  3. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  4. cd $SCRIPT_PATH
  5. # Load and export variables from root .env file into shell environment
  6. set -a
  7. . ../.env
  8. set +a
  9. yarn clean
  10. # Install hydra codegen in separate dir to avoid dependency clashes
  11. cd ./codegen
  12. yarn
  13. cd ..
  14. # Generate types and server code
  15. TYPEGEN_WS_URI="${TYPEGEN_WS_URI:-ws://localhost:9944}" yarn typegen:configure
  16. yarn typegen
  17. yarn codegen:noinstall
  18. yarn format
  19. # We run yarn again to ensure graphql-server dependencies are installed
  20. # and are inline with root workspace resolutions
  21. yarn
  22. yarn workspace query-node build:dev
  23. yarn workspace query-node-mappings build