更新 CI 规则

This commit is contained in:
wxy 2017-12-20 16:04:21 +08:00
parent 3a2ed52f18
commit 897a029b5e

View File

@ -18,8 +18,8 @@ $(CHANGE_FILE):
git --no-pager diff $(TRAVIS_BRANCH) FETCH_HEAD --no-renames --name-status > $@
rule-source-added:
[ $(shell grep '^A\s\+sources/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) -ge 1 ]
[ $(shell grep -v '^A\s\+sources/(news|talk|tech)/\d{8} [a-zA-Z0-9_-.,\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 0 ]
[ $(shell grep '^A\s\+sources/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) -ge 1 ]
[ $(shell grep -v '^A\s\+sources/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 0 ]
echo 'Rule Matched: $(@)'
rule-translation-requested:
@ -28,7 +28,7 @@ rule-translation-requested:
echo 'Rule Matched: $(@)'
rule-translation-completed:
[ $(shell grep '^D\s\+sources/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 1 ]
[ $(shell grep '^D\s\+sources/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 1 ]
[ $(shell grep '^A\s\+translated/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 1 ]
[ $(shell cat $(CHANGE_FILE) | wc -l) = 2 ]
echo 'Rule Matched: $(@)'
@ -40,6 +40,6 @@ rule-translation-revised:
rule-translation-published:
[ $(shell grep '^D\s\+translated/(news|talk|tech)/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 1 ]
[ $(shell grep '^A\s\+published/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 1 ]
[ $(shell grep '^A\s\+published/\d{8} [a-zA-Z0-9_.,\-\(\)\[\] ]*\.md' $(CHANGE_FILE) | wc -l) = 1 ]
[ $(shell cat $(CHANGE_FILE) | wc -l) = 2 ]
echo 'Rule Matched: $(@)'