mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: Made githook scripts executable
This commit is contained in:
parent
609d103779
commit
6fcc37e15c
2
.githooks/pre-commit
Normal file → Executable file
2
.githooks/pre-commit
Normal file → Executable file
@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "Running local AppFlowy pre-commit hook."
|
||||||
|
|
||||||
#flutter format .
|
#flutter format .
|
||||||
##https://gist.github.com/benmccallum/28e4f216d9d72f5965133e6c43aaff6e
|
##https://gist.github.com/benmccallum/28e4f216d9d72f5965133e6c43aaff6e
|
||||||
limit=$(( 1 * 2**20 )) # 1MB
|
limit=$(( 1 * 2**20 )) # 1MB
|
||||||
|
5
.githooks/pre-push
Normal file → Executable file
5
.githooks/pre-push
Normal file → Executable file
@ -1,15 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "Running local AppFlowy pre-push hook."
|
||||||
|
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ `git status --porcelain` ]]; then
|
||||||
printf "\e[31;1m%s\e[0m\n" 'This script needs to run against committed code only. Please commit or stash you changes.'
|
printf "\e[31;1m%s\e[0m\n" 'This script needs to run against committed code only. Please commit or stash you changes.'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\e[33;1m%s\e[0m\n" 'Running the Flutter analyzer'
|
printf "\e[33;1m%s\e[0m\n" 'Running the Flutter analyzer'
|
||||||
flutter analyze
|
flutter analyze
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
printf "\e[31;1m%s\e[0m\n" 'Flutter analyzer error'
|
printf "\e[31;1m%s\e[0m\n" 'Flutter analyzer error'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "\e[33;1m%s\e[0m\n" 'Finished running the Flutter analyzer'
|
printf "\e[33;1m%s\e[0m\n" 'Finished running the Flutter analyzer'
|
||||||
printf "\e[33;1m%s\e[0m\n" 'Running unit tests'
|
printf "\e[33;1m%s\e[0m\n" 'Running unit tests'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user