Skip to content

Commit

Permalink
fix: sync-mod (#848)
Browse files Browse the repository at this point in the history
* fix: sync-mod

* fix: update pre-commit

Co-authored-by: mikatong <mikatong@tencent.com>
  • Loading branch information
tongyiming and mikatong authored Jan 28, 2022
1 parent 59d0949 commit 3623a6a
Show file tree
Hide file tree
Showing 3 changed files with 2,626 additions and 62 deletions.
13 changes: 5 additions & 8 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
#!/bin/sh

printf "==> Step 1: Gofmt Check...\n"
make fmtcheck
if [ $? -ne 0 ]; then
printf "COMMIT FAILED\n"
exit 1
fi

#make test-build
#if [ $? -ne 0 ]; then
# printf "COMMIT FAILED\n"
# exit 1
#fi
#

#make lint
#if [ $? -ne 0 ]; then
# printf "COMMIT FAILED\n"
# exit 1
#fi

printf "==> Generating docs for tencentcloud provider...\n"
printf "==> Step 2: Generating docs for tencentcloud provider...\n"
doc=`make doc 2>&1`
if [ $? -ne 0 ]; then
echo "$doc"| tail -n 4|head -n 2
Expand All @@ -32,13 +27,15 @@ fi
# exit 1
#fi

printf "==> Step 3: Doc Check...\n"
diff=`git diff --name-only website/docs/`
if [ "$diff" != "" ]; then
printf "There are docs updated when checking, 'git add' it first.\n"
printf "COMMIT FAILED\n"
exit 1
fi

printf "==> Step 4: Incremental unit tests...\n"
# go test check
make deltatest
if [ $? -ne 0 ]; then
Expand Down
Loading

0 comments on commit 3623a6a

Please sign in to comment.