Selaa lähdekoodia

fix: Made githook scripts executable

MikeWallaceDev 2 vuotta sitten
vanhempi
commit
6fcc37e15c
2 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 3 1
      .githooks/pre-commit
  2. 5 0
      .githooks/pre-push

+ 3 - 1
.githooks/pre-commit

@@ -1,5 +1,7 @@
 #!/usr/bin/env bash
 
+echo "Running local AppFlowy pre-commit hook."
+
 #flutter format .
 ##https://gist.github.com/benmccallum/28e4f216d9d72f5965133e6c43aaff6e
 limit=$(( 1 * 2**20 )) # 1MB
@@ -31,4 +33,4 @@ for file in $( git diff-index --cached --name-only $against ); do
 		file_too_large $filename $file_size
 		exit 1;
 	fi
-done
+done

+ 5 - 0
.githooks/pre-push

@@ -1,15 +1,20 @@
 #!/usr/bin/env bash
 
+echo "Running local AppFlowy pre-push hook."
+
 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.'
   exit 1
 fi
+
 printf "\e[33;1m%s\e[0m\n" 'Running the Flutter analyzer'
 flutter analyze
+
 if [ $? -ne 0 ]; then
   printf "\e[31;1m%s\e[0m\n" 'Flutter analyzer error'
   exit 1
 fi
+
 printf "\e[33;1m%s\e[0m\n" 'Finished running the Flutter analyzer'
 printf "\e[33;1m%s\e[0m\n" 'Running unit tests'