build.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env bash
  2. set -e
  3. yarn
  4. yarn workspace @joystream/types build
  5. yarn workspace @joystream/cli build
  6. yarn workspace query-node-root build
  7. yarn workspace storage-node build
  8. # Not strictly needed during development, we run "yarn workspace pioneer start" to start
  9. # a dev instance, but will show highlight build issues
  10. yarn workspace pioneer build
  11. if ! command -v docker-compose &> /dev/null
  12. then
  13. echo "docker-compose not found, skipping docker build!"
  14. else
  15. # Build joystream/apps docker image
  16. docker-compose build pioneer
  17. # Optionally build joystream/node docker image
  18. # TODO: Try to fetch a cached joystream/node image
  19. # if one is found matching code shasum instead of building
  20. while true
  21. do
  22. read -p "Rebuild joystream/node docker image? (y/N): " answer2
  23. case $answer2 in
  24. [yY]* ) docker-compose build joystream-node
  25. break;;
  26. [nN]* ) break;;
  27. * ) break;;
  28. esac
  29. done
  30. fi
  31. # Build cargo crates: native binaries joystream/node, wasm runtime, and chainspec builder.
  32. while true
  33. do
  34. read -p "Compile joystream node native binary? (y/N): " answer1
  35. case $answer1 in
  36. [yY]* ) yarn cargo-checks
  37. yarn cargo-build
  38. break;;
  39. [nN]* ) break;;
  40. * ) break;;
  41. esac
  42. done