build_sdk.sh 912 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. #!/usr/bin/env fish
  3. echo 'Start building rust sdk'
  4. rustup show
  5. #Env check
  6. #1. rustc --version will be the same as cargo --version
  7. #2. override the toolchain if the current toolchain not equal to the rust-toolchain file specified.
  8. # rustup override set stable-2021-04-24
  9. #3. Check your cargo env using the same source by: which cargo
  10. # 1. ~/.bash_profile,
  11. # 2. ~/.bashrc
  12. # 3. ~/.profile
  13. # 4. ~/.zshrc
  14. case "$FLOWY_DEV_ENV" in
  15. Linux-aarch64)
  16. cargo make --profile development-linux-aarch64 flowy-sdk-dev
  17. ;;
  18. Linux-x86)
  19. cargo make --profile development-linux-x86 flowy-sdk-dev
  20. ;;
  21. macOS)
  22. cargo make --profile "development-mac-$(uname -m)" flowy-sdk-dev
  23. ;;
  24. Windows)
  25. cargo make --profile development-windows flowy-sdk-dev
  26. ;;
  27. *)
  28. # All undefined cases
  29. echo "[ERROR] The FLOWY_DEV_ENV environment variable must be set. Please see the GitHub wiki for instructions."
  30. exit 1
  31. ;;
  32. esac