install_macos.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. BLUE="\e[34m"
  3. GREEN="\e[32m"
  4. RED="\e[31m"
  5. ENDCOLOR="\e[0m"
  6. # Install Rust
  7. echo -e "${BLUE}AppFlowy : The Rust programming language is required to compile AppFlowy.${ENDCOLOR}"
  8. echo -e "${BLUE}AppFlowy : We can install it now if you don't already have it on your system.${ENDCOLOR}"
  9. read -p "$(echo -e $GREEN"AppFlowy : Do you want to install Rust? [y/N]"$ENDCOLOR) " installrust
  10. if [ ${installrust^^} == "Y" ]; then
  11. echo -e "${BLUE}AppFlowy : Installing Rust.${ENDCOLOR}"
  12. brew 'rustup-init'
  13. rustup-init -y --default-toolchain=stable
  14. else
  15. echo -e "${BLUE}AppFlowy : Skipping Rust installation.${ENDCOLOR}"
  16. fi
  17. # Install sqllite
  18. echo -e "${BLUE}AppFlowy : Installing SqlLite3.${ENDCOLOR}"
  19. brew 'sqlite3'
  20. # Enable the flutter stable channel
  21. echo -e "${BLUE}AppFlowy : Checking Flutter installation.${ENDCOLOR}"
  22. flutter channel stable
  23. # Enable linux desktop
  24. flutter config --enable-linux-desktop
  25. # Fix any problems reported by flutter doctor
  26. flutter doctor
  27. # Add the githooks directory to your git configuration
  28. echo -e "${BLUE}AppFlowy : Setting up githooks.${ENDCOLOR}"
  29. git config core.hooksPath .githooks
  30. # Change to the frontend directory
  31. cd frontend
  32. # Install cargo make
  33. echo -e "${BLUE}AppFlowy : Installing cargo-make.${ENDCOLOR}"
  34. cargo install --force cargo-make
  35. # Install duckscript
  36. echo -e "${BLUE}AppFlowy : Installing duckscript.${ENDCOLOR}"
  37. cargo install --force duckscript_cli
  38. # Install CommitLint
  39. echo -e "${BLUE}AppFlowy : Installing CommitLint.${ENDCOLOR}"
  40. npm install @commitlint/cli @commitlint/config-conventional --save-dev
  41. # Check prerequisites
  42. echo -e "${BLUE}AppFlowy : Checking prerequisites.${ENDCOLOR}"
  43. cargo make flowy_dev