2018-04-11 23:10:56 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2018-04-23 12:20:35 +00:00
|
|
|
# Because travis _SUCKS_ really hard, we cannot find the "master" commit or any
|
|
|
|
# commit where the current branch is derived from (if this is not master).
|
|
|
|
# So we simply use HEAD~49..HEAD as the range to check. This might break some
|
|
|
|
# day, I don't know.
|
|
|
|
# But as travis only clones 50 commits and does not provide ANY usable
|
|
|
|
# information about the commits, this is the only thing we can do.
|
|
|
|
COMMIT_RANGE="HEAD~49..HEAD"
|
2018-04-11 23:10:56 +00:00
|
|
|
|
|
|
|
logfreeof() {
|
|
|
|
git log --format="%s" $COMMIT_RANGE |\
|
|
|
|
awk '{print $1}' |\
|
|
|
|
grep -i "$1" && echo "LOG CONTAINS '$1'" && exit 1
|
|
|
|
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
logfreeof "fixup"
|
|
|
|
logfreeof "squash"
|
|
|
|
logfreeof "wip"
|
|
|
|
logfreeof "tmp"
|
|
|
|
logfreeof "ci skip"
|
|
|
|
|