Skip to content

Commit a58fa45

Browse files
authored
fix(travis): Validate TRAVIS_PULL_REQUEST_SHA rather than TRAVIS_COMMIT. (#3093)
Also add some debug messages for commits and remove an old node4 command.
1 parent 88b977f commit a58fa45

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.travis.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ env:
1414
matrix:
1515
fast_finish: true
1616
include:
17-
- node_js: "8"
17+
- name: "Lint code and commit message format"
18+
node_js: "8"
1819
env: VALIDATE_COMMIT_MSG=true LINT=true
1920

2021
before_install:
2122
- npm config set loglevel warn
2223
- g++-4.8 --version
23-
- if [[ "`node --version`" = v4* ]]; then npm install -g npm@latest-3; fi
2424

2525
addons:
2626
firefox:
@@ -36,7 +36,10 @@ before_script:
3636
- sh -e /etc/init.d/xvfb start
3737
- npm run init
3838
- export $(openssl aes-256-cbc -pass env:CREDENTIALS_PASS -d -in credentials)
39-
- 'if [ "$VALIDATE_COMMIT_MSG" == "true" ]; then ./scripts/validate-commit-msg.sh $TRAVIS_COMMIT; fi'
39+
- echo "git head commit $(git rev-parse FETCH_HEAD)"
40+
- echo "TRAVIS_COMMIT $TRAVIS_COMMIT"
41+
- echo "TRAVIS_PULL_REQUEST_SHA $TRAVIS_PULL_REQUEST_SHA"
42+
- 'if [ "$VALIDATE_COMMIT_MSG" == "true" ]; then ./scripts/validate-commit-msg.sh $TRAVIS_PULL_REQUEST_SHA; fi'
4043
- 'if [ "$LINT" == "true" ]; then npm run lint; fi'
4144

4245
script:

0 commit comments

Comments
 (0)