Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
fix: improved development environment installation
MikeWallaceDev39900022db9f
diff --git a/Makefile.toml b/Makefile.tomldeleted file mode 100644index 2e75c10277..0000000000--- a/Makefile.toml+++ /dev/null@@ -1,35 +0,0 @@-[tasks.install-commitlint.mac]-script = [- """- brew install npm- yarn install- yarn husky install- """,-]-script_runner = "@shell"--[tasks.install-commitlint.windows]-script = [- """- echo "WIP"- """,-]-script_runner = "@duckscript"--[tasks.install-commitlint.linux]-script = [- """- if command -v apt &> /dev/null- then- echo "Installing node.js and yarn (sudo apt install nodejs yarn)"- sudo apt install nodejs yarn- else- echo "Installing node.js and yarn (sudo pacman -S nodejs yarn)"- sudo pacman -S nodejs yarn- fi-- yarn install- yarn husky install- """,-]-script_runner = "@shell"diff --git a/frontend/Makefile.toml b/frontend/Makefile.tomlindex 337b9efd76..7449bfeef3 100644--- a/frontend/Makefile.toml+++ b/frontend/Makefile.toml@@ -8,6 +8,7 @@ extend = [{ path = "scripts/makefile/env.toml" },{ path = "scripts/makefile/flutter.toml" },{ path = "scripts/makefile/tool.toml" },+ { path = "scripts/makefile/githooks.toml" },][config]diff --git a/frontend/scripts/install_dev_env/install_linux.sh b/frontend/scripts/install_dev_env/install_linux.shnew file mode 100755index 0000000000..1d8e7f810d--- /dev/null+++ b/frontend/scripts/install_dev_env/install_linux.sh@@ -0,0 +1,50 @@+#!/bin/bash++BLUE="\e[34m"+GREEN="\e[32m"+ENDCOLOR="\e[0m"+++# Install rust on Linux+read -p 'Do you want to install Rust? [y/N] ' installrust+++if [ ${installrust^^} == "Y" ]; then+ echo -e "${BLUE}AppFlowy : Installing Rust.${ENDCOLOR}"+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh+ source $HOME/.cargo/env+ rustup toolchain install stable+ rustup default stable+else+ echo -e "${BLUE}AppFlowy : Skipping Rust installation.${ENDCOLOR}"+fi++# Enable the flutter stable channel+echo -e "${BLUE}AppFlowy : Checking Flutter installation.${ENDCOLOR}"+flutter channel stable++# Enable linux desktop+flutter config --enable-linux-desktop++# Fix any problems reported by flutter doctor+flutter doctor++# Add the githooks directory to your git configuration+echo -e "${BLUE}AppFlowy : Setting up githooks.${ENDCOLOR}"+git config core.hooksPath .githooks++# Change to the frontend directory+cd frontend++# Install cargo make+echo -e "${BLUE}AppFlowy : Installing cargo-make.${ENDCOLOR}"+cargo install --force cargo-make++# Install duckscript+echo -e "${BLUE}AppFlowy : Installing duckscript.${ENDCOLOR}"+cargo install --force duckscript_cli++# Install CommitLint+echo -e "${BLUE}AppFlowy : Installing CommitLint.${ENDCOLOR}"+npm install @commitlint/cli @commitlint/config-conventional --save-dev+diff --git a/frontend/scripts/makefile/githooks.toml b/frontend/scripts/makefile/githooks.tomlnew file mode 100644index 0000000000..f6b066ec49--- /dev/null+++ b/frontend/scripts/makefile/githooks.toml@@ -0,0 +1,39 @@+[tasks.install-commitlint.mac]+script = [+ """+ brew install npm+ npm install @commitlint/cli @commitlint/config-conventional --save-dev++ git config core.hooksPath .githooks+ """,+]+script_runner = "@shell"++[tasks.install-commitlint.windows]+script = [+ """+ echo "WIP"++ git config core.hooksPath .githooks+ """,+]+script_runner = "@duckscript"++[tasks.install-commitlint.linux]+script = [+ """+ if command -v apt &> /dev/null+ then+ echo "Installing node.js (sudo apt install nodejs)"+ sudo apt install nodejs+ else+ echo "Installing node.js (sudo pacman -S nodejs)"+ sudo pacman -S nodejs+ fi++ npm install @commitlint/cli @commitlint/config-conventional --save-dev++ git config core.hooksPath .githooks+ """,+]+script_runner = "@shell"