mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: add gitlint dependency
This commit is contained in:
parent
943ce37623
commit
f993e1d076
@ -16,7 +16,14 @@ test "" = "$(grep '^Signed-off-by: ' "$1" |
|
||||
exit 1
|
||||
}
|
||||
|
||||
npx --no -- commitlint --edit $1
|
||||
.githooks/gitlint \
|
||||
--msg-file=$1 \
|
||||
--subject-regex="^([bB]uild|[cC]hore|[cC]i|[dD]ocs|[fF]eat|[fF]eature|[fF]ix|[pP]erf|[rR]efactor|[rR]evert|[sS]tyle|[tT]est)(.*)?\s?:\s?.*" \
|
||||
--subject-maxlen=100 \
|
||||
--subject-minlen=10 \
|
||||
--body-regex=".*" \
|
||||
--body-maxlen=200 \
|
||||
--max-parents=1
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -32,3 +32,6 @@ frontend/.vscode/*
|
||||
# Commit the highest level pubspec.lock, but ignore the others
|
||||
pubspec.lock
|
||||
!frontend/app_flowy/pubspec.lock
|
||||
|
||||
# ignore tool used for commit linting
|
||||
.githooks/gitlint
|
||||
|
@ -50,6 +50,13 @@ flutter doctor
|
||||
printMessage "Setting up githooks."
|
||||
git config core.hooksPath .githooks
|
||||
|
||||
# Install go-gitlint
|
||||
printMessage "Installing go-gitlint."
|
||||
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}
|
||||
|
||||
# Change to the frontend directory
|
||||
cd frontend
|
||||
|
||||
@ -62,8 +69,9 @@ printMessage "Installing duckscript."
|
||||
cargo install --force duckscript_cli
|
||||
|
||||
# Install CommitLint
|
||||
printMessage "Installing CommitLint."
|
||||
npm install @commitlint/cli @commitlint/config-conventional --save-dev
|
||||
printMessage "Installing go-gitlint."
|
||||
wget https://github.com/llorllale/go-gitlint/releases/download/1.1.0/go-gitlint_1.1.0_linux_x86_64.tar.gz
|
||||
tar -xf go-gitlint_1.1.0_linux_x86_64.tar.gz - C
|
||||
|
||||
# Check prerequisites
|
||||
printMessage "Checking prerequisites."
|
||||
|
@ -50,6 +50,13 @@ flutter doctor
|
||||
printMessage "Setting up githooks."
|
||||
git config core.hooksPath .githooks
|
||||
|
||||
# Install go-gitlint
|
||||
printMessage "Installing go-gitlint."
|
||||
GOLINT_FILENAME="go-gitlint_1.1.0_osx_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}
|
||||
|
||||
# Change to the frontend directory
|
||||
cd frontend
|
||||
|
||||
@ -61,10 +68,6 @@ cargo install --force cargo-make
|
||||
printMessage "Installing duckscript."
|
||||
cargo install --force duckscript_cli
|
||||
|
||||
# Install CommitLint
|
||||
printMessagae "Installing CommitLint."
|
||||
npm install @commitlint/cli @commitlint/config-conventional --save-dev
|
||||
|
||||
# Check prerequisites
|
||||
printMessage "Checking prerequisites."
|
||||
cargo make flowy_dev
|
||||
|
Loading…
Reference in New Issue
Block a user