mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Merge pull request #632 from MikeWallaceDev/fix_install_dev_env
Improved development environment installation
This commit is contained in:
commit
d0d90a90ee
@ -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"
|
|
@ -1,2 +0,0 @@
|
|||||||
brew 'sqlite3'
|
|
||||||
brew 'rustup-init'
|
|
@ -1,14 +0,0 @@
|
|||||||
.PHONY: flowy_dev_install flowy_clean
|
|
||||||
|
|
||||||
flowy_dev_install:
|
|
||||||
brew bundle
|
|
||||||
rustup-init -y --default-toolchain=stable
|
|
||||||
cargo install --force cargo-make
|
|
||||||
cargo install --force duckscript_cli
|
|
||||||
cargo make flowy_dev
|
|
||||||
|
|
||||||
|
|
||||||
flowy_clean:
|
|
||||||
sh ./scripts/clean.sh
|
|
||||||
|
|
||||||
|
|
@ -8,6 +8,7 @@ extend = [
|
|||||||
{ path = "scripts/makefile/env.toml" },
|
{ path = "scripts/makefile/env.toml" },
|
||||||
{ path = "scripts/makefile/flutter.toml" },
|
{ path = "scripts/makefile/flutter.toml" },
|
||||||
{ path = "scripts/makefile/tool.toml" },
|
{ path = "scripts/makefile/tool.toml" },
|
||||||
|
{ path = "scripts/makefile/githooks.toml" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[config]
|
[config]
|
||||||
|
57
frontend/scripts/install_dev_env/install_linux.sh
Executable file
57
frontend/scripts/install_dev_env/install_linux.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BLUE="\e[34m"
|
||||||
|
GREEN="\e[32m"
|
||||||
|
RED="\e[31m"
|
||||||
|
ENDCOLOR="\e[0m"
|
||||||
|
|
||||||
|
# Note: This script does not install applications which are installed by the package manager. There are too many package managers out there.
|
||||||
|
|
||||||
|
# Install Rust
|
||||||
|
echo -e "${BLUE}AppFlowy : The Rust programming language is required to compile AppFlowy.${ENDCOLOR}"
|
||||||
|
echo -e "${BLUE}AppFlowy : We can install it now if you don't already have it on your system.${ENDCOLOR}"
|
||||||
|
|
||||||
|
read -p "$(echo -e $GREEN"AppFlowy : Do you want to install Rust? [y/N]"$ENDCOLOR) " 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
|
||||||
|
|
||||||
|
# Check prerequisites
|
||||||
|
echo -e "${BLUE}AppFlowy : Checking prerequisites.${ENDCOLOR}"
|
||||||
|
cargo make flowy_dev
|
57
frontend/scripts/install_dev_env/install_macos.sh
Executable file
57
frontend/scripts/install_dev_env/install_macos.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BLUE="\e[34m"
|
||||||
|
GREEN="\e[32m"
|
||||||
|
RED="\e[31m"
|
||||||
|
ENDCOLOR="\e[0m"
|
||||||
|
|
||||||
|
# Install Rust
|
||||||
|
echo -e "${BLUE}AppFlowy : The Rust programming language is required to compile AppFlowy.${ENDCOLOR}"
|
||||||
|
echo -e "${BLUE}AppFlowy : We can install it now if you don't already have it on your system.${ENDCOLOR}"
|
||||||
|
|
||||||
|
read -p "$(echo -e $GREEN"AppFlowy : Do you want to install Rust? [y/N]"$ENDCOLOR) " installrust
|
||||||
|
|
||||||
|
if [ ${installrust^^} == "Y" ]; then
|
||||||
|
echo -e "${BLUE}AppFlowy : Installing Rust.${ENDCOLOR}"
|
||||||
|
brew 'rustup-init'
|
||||||
|
rustup-init -y --default-toolchain=stable
|
||||||
|
else
|
||||||
|
echo -e "${BLUE}AppFlowy : Skipping Rust installation.${ENDCOLOR}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install sqllite
|
||||||
|
echo -e "${BLUE}AppFlowy : Installing SqlLite3.${ENDCOLOR}"
|
||||||
|
brew 'sqlite3'
|
||||||
|
|
||||||
|
# Enable the flutter stable channel
|
||||||
|
echo -e "${BLUE}AppFlowy : Checking Flutter installation.${ENDCOLOR}"
|
||||||
|
flutter channel stable
|
||||||
|
|
||||||
|
# Enable linux desktop
|
||||||
|
flutter config --enable-macos-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
|
||||||
|
|
||||||
|
# Check prerequisites
|
||||||
|
echo -e "${BLUE}AppFlowy : Checking prerequisites.${ENDCOLOR}"
|
||||||
|
cargo make flowy_dev
|
39
frontend/scripts/makefile/githooks.toml
Normal file
39
frontend/scripts/makefile/githooks.toml
Normal file
@ -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"
|
Loading…
x
Reference in New Issue
Block a user