Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (22 sloc) 829 Bytes
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