mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-29 18:27:58 +08:00
change check shell
This commit is contained in:
parent
eef6b2b702
commit
bc597aaa35
5
check.sh
5
check.sh
@ -1,6 +1,4 @@
|
||||
#!/bin/sh
|
||||
sudo apt-get update && sudo apt-get install -y jq || exit 1
|
||||
|
||||
pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
|
||||
|
||||
URL="https://api.github.com/repos/goodrain/rainbond/pulls/${pull_number}/files"
|
||||
@ -9,5 +7,8 @@ URL="https://api.github.com/repos/goodrain/rainbond/pulls/${pull_number}/files"
|
||||
# 这里用 jq 过滤了部分文件
|
||||
CHANGED_MARKDOWN_FILES=$(curl -s -X GET -G $URL | jq -r '.[] | select(.status != "removed") | select(.filename | endswith(".go")) | .filename')
|
||||
for file in ${CHANGED_MARKDOWN_FILES}; do
|
||||
echo "golint ${file}"
|
||||
golint -set_exit_status=true ${file} || exit 1
|
||||
done
|
||||
|
||||
echo "code golint check success"
|
Loading…
Reference in New Issue
Block a user