Skip to content

Commit 0649435

Browse files
committed
Update Travis script
TravisCI is cloning things in a weird way (possibly Jenkins too) so let's adjust the CI script as well as the bash script itself in order to compare against the remote master and not the (possibly missing) local one.
1 parent bc20cb5 commit 0649435

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ cache:
1414
install:
1515
- pip3 install textblob
1616
- python3 -m textblob.download_corpora
17+
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
18+
- git fetch --all
1719

1820
script:
1921
# Run the unit tests (you probably don't need to run this in your CI)
2022
- pytest bad_commit_message_blocker_tests.py
21-
# Run the script passing the current commit message as argument
22-
- python3 bad_commit_message_blocker.py --message "$TRAVIS_COMMIT_MESSAGE"
23+
# Verify that all commit messages in current branch abide by the best practices
24+
- bash multiple_commits.sh

multiple_commits.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -eu
33

4-
commits_since_master=$(git rev-list HEAD ^master)
4+
commits_since_master=$(git rev-list HEAD ^origin/master)
55

66
while read -r commit_hash; do
77
commit_message="$(git log --format=%B -n 1 $commit_hash)"

0 commit comments

Comments
 (0)