chore: add install gitlint script & ignore body length

This commit is contained in:
appflowy 2022-09-22 10:48:13 +08:00
parent 3cd9ea5366
commit ca50e61762
3 changed files with 38 additions and 11 deletions

View File

@ -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 ]

View File

@ -34,6 +34,8 @@ else
printMessage "Skipping Rust installation."
fi
abvc
# Install sqllite
printMessage "Installing sqlLite3."
brew install sqlite3

View File

@ -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
"""