Skip to content

Commit b6621b0

Browse files
committed
travis: replace SHA_MAIN/PR screen-scraping with TRAVIS_COMMIT_RANGE
I've been keeping an eye on both and they've always been identical every time I looked. TRAVIS_COMMIT_RANGE is obviously simpler. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
1 parent 41fea6e commit b6621b0

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,12 @@ jobs:
8585
- sudo mkdir -p /usr/share/codespell && sudo ln -s
8686
/usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt
8787
/usr/share/codespell/dictionary.txt
88-
# TODO: stop screen-scraping the git log and switch to
89-
# ${TRAVIS_COMMIT_RANGE} or ${TRAVIS_BRANCH}..HEAD after testing
90-
# both force pushes and not.
88+
9189
# Note TRAVIS_COMMIT_RANGE has triple dots for "git diff" and
9290
# needs conversion to double dots for git log's inconsistent
9391
# user interface.
94-
- printf '%s %s\n' "${TRAVIS_BRANCH}" "${TRAVIS_COMMIT_RANGE/.../..}"
95-
- SHA_PR=`git log --oneline -1 | sed -rn "s/.*Merge (.*) into.*/\1/p"`
96-
- SHA_MAIN=`git log --oneline -1 | sed -rn "s/.*Merge .* into (.*)/\1/p"`
97-
- ( set -x; scripts/checkpatch.pl --strict --codespell -g $SHA_MAIN..$SHA_PR )
92+
- ( set -x; scripts/checkpatch.pl --strict --codespell
93+
-g "${TRAVIS_COMMIT_RANGE/.../..}" )
9894

9995
- name: Sparse check
10096
script:

0 commit comments

Comments
 (0)