瀏覽代碼

Merge branch 'main' of github.com:AppFlowy-IO/appflowy_client

appflowy 3 年之前
父節點
當前提交
2c1e8eee23
共有 3 個文件被更改,包括 26 次插入1 次删除
  1. 4 0
      .githook/pre-commit
  2. 21 0
      .githook/pre-push
  3. 1 1
      README.md

+ 4 - 0
.githook/pre-commit

@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+#flutter format .
+

+ 21 - 0
.githook/pre-push

@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+cd flutter-lib
+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'
+
+#flutter test
+#if [ $? -ne 0 ]; then
+#  printf "\e[31;1m%s\e[0m\n" 'Unit tests error'
+#  exit 1
+#fi
+#printf "\e[33;1m%s\e[0m\n" 'Finished running unit tests'

+ 1 - 1
README.md

@@ -17,7 +17,7 @@
 Read the [Contributing Doc](doc/contribute.md) before you want to contribute.
 
 ## Social Media
-* Slack
+* Slack (to be determined)
 
 ## License
 AppFlowy is under the Apache 2.0 license. See the [LICENSE](/LICENSE) file for details.