forked from thibmaek/awesome-raspberry-pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (22 loc) · 829 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
language: ruby
install:
- gem install mdl awesome_bot
before_script:
# Get the current branch name
- export CURR_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
script:
- mdl README.md
- awesome_bot README.md --allow-redirect
# See if contributor was added
- if git diff-tree --no-commit-id --name-only -r $(git rev-parse HEAD) | grep CONTRIBUTORS.md; then
exit 0;
else
echo "Checking if contributors are up to date for branch $CURR_BRANCH"
if [[ "$CURR_BRANCH" == feature/* ]]; then
echo "Skipping CONTRIBUTORS.md check because build branch is a feature branch";
exit 0;
else
echo "⚠️ Contributor did not add themselve to the CONTRIBUTORS.md list";
exit 1;
fi
fi