Skip to content

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.

chore: add install gitlint script & ignore body length

appflowyca50e6176226
diff --git a/.githooks/commit-msg b/.githooks/commit-msg
index d8a55c9405..192fc9dd12 100755
--- a/.githooks/commit-msg
+++ b/.githooks/commit-msg
@@ -36,10 +36,9 @@ test "" = "$(grep '^Signed-off-by: ' "$1" |
.githooks/gitlint \
--msg-file=$1 \
--subject-regex="^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|test)(.*)?:\s?.*" \
- --subject-maxlen=100 \
+ --subject-maxlen=150 \
--subject-minlen=10 \
--body-regex=".*" \
- --body-maxlen=200 \
--max-parents=1
if [ $? -ne 0 ]
diff --git a/frontend/scripts/install_dev_env/install_macos.sh b/frontend/scripts/install_dev_env/install_macos.sh
index f7e9d73909..f4ae69390c 100755
--- a/frontend/scripts/install_dev_env/install_macos.sh
+++ b/frontend/scripts/install_dev_env/install_macos.sh
@@ -34,6 +34,8 @@ else
printMessage "Skipping Rust installation."
fi
+abvc
+
# Install sqllite
printMessage "Installing sqlLite3."
brew install sqlite3
diff --git a/frontend/scripts/makefile/env.toml b/frontend/scripts/makefile/env.toml
index ae36f2d1ba..7eb1376ab8 100644
--- a/frontend/scripts/makefile/env.toml
+++ b/frontend/scripts/makefile/env.toml
@@ -121,15 +121,6 @@ rbenv global 2.7.1
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash
"""
-[tasks.install_fish]
-script = """
-brew install fish
-
-# https://stackoverflow.com/questions/26208231/modifying-path-with-fish-shell
-# Export the PATH using the command:
-# set -Ua fish_user_paths the_path_you_want_to_export
-"""
-
[tasks.install_flutter]
script = """
ret = which flutter
@@ -141,3 +132,38 @@ end
"""
script_runner = "@duckscript"
+
+[tasks.enable_git_hook]
+dependencies=["download_gitlint"]
+script = """
+git config core.hooksPath .githooks
+"""
+script_runner = "@duckscript"
+
+[tasks.download_gitlint]
+script = """
+GOLINT_FILENAME="go-gitlint_1.1.0_osx_x86_64.tar.gz"
+curl -L https://github.com/llorllale/go-gitlint/releases/download/1.1.0/${GOLINT_FILENAME} --output ${GOLINT_FILENAME}
+tar -zxv --directory ../.githooks/. -f ${GOLINT_FILENAME} gitlint
+rm ${GOLINT_FILENAME}
+"""
+
+[tasks.download_gitlint.linux]
+script = """
+GOLINT_FILENAME="go-gitlint_1.1.0_linux_x86_64.tar.gz"
+wget https://github.com/llorllale/go-gitlint/releases/download/1.1.0/${GOLINT_FILENAME}
+tar -zxv --directory ../.githooks/. -f ${GOLINT_FILENAME} gitlint
+rm ${GOLINT_FILENAME}
+"""
+
+
+[tasks.download_gitlint.windows]
+script = """
+GOLINT_FILENAME="go-gitlint_1.1.0_windows_x86_64.tar.gz"
+if curl --proto '=https' --tlsv1.2 -sSfL https://github.com/llorllale/go-gitlint/releases/download/1.1.0/${GOLINT_FILENAME} -o ${GOLINT_FILENAME}; then
+ tar -zxv --directory ../.githooks/. -f ${GOLINT_FILENAME} gitlint.exe
+ rm ${GOLINT_FILENAME}
+else
+ echo "Failed to install go-gitlint"
+fi
+"""
\ No newline at end of file