build.sh 1.3 KB

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