AppFlowy/.githooks/pre-push

37 lines
691 B
Plaintext
Raw Normal View History

2021-07-06 14:56:56 +03:00
#!/usr/bin/env bash
2021-07-08 09:14:03 +03:00
YELLOW="\e[93m"
GREEN="\e[32m"
RED="\e[31m"
ENDCOLOR="\e[0m"
printMessage() {
printf "${YELLOW}AppFlowy : $1${ENDCOLOR}\n"
}
printSuccess() {
printf "${GREEN}AppFlowy : $1${ENDCOLOR}\n"
}
printError() {
printf "${RED}AppFlowy : $1${ENDCOLOR}\n"
}
printMessage "Running local AppFlowy pre-push hook."
2022-07-17 23:54:49 +03:00
2021-07-06 14:56:56 +03:00
if [[ `git status --porcelain` ]]; then
printError "This script needs to run against committed code only. Please commit or stash you changes."
2021-07-06 14:56:56 +03:00
exit 1
fi
2022-07-17 23:54:49 +03:00
#
#printMessage "Running the Flutter analyzer"
#flutter analyze
#
2021-07-06 14:56:56 +03:00
#if [ $? -ne 0 ]; then
# printError "Flutter analyzer error"
2021-07-06 14:56:56 +03:00
# exit 1
#fi
#
#printMessage "Finished running the Flutter analyzer"